ArduPilot / ArduPilot/MissionPlanner

Create_terrain.py script issues random crc16 warnings

Open
#2,396 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
2.4k
Forks
2.9k
Avg merge
19h 16m
Merged PRs (30d)
4

Description

When using the create_terrain.py script, running on Ubuntu 20.04 with python 3.8.2, I randomly get the following two warnings:

1. create_terrain.py:205: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
block.crc = crc16.crc16xmodem(buf)

2. create_terrain.py:223: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
crc2 = crc16.crc16xmodem(buf[:1821])

Is this expected?
Update: I loaded up a virtual Ubuntu 18.04 with python 3.6.9 and I don't get any of the crc16 errors. So something with python 3.8 and the crc16 module I suspect. A hash of the files show no differences between them so that answers the question that the python 3.8 files should be ok.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with create_terrain.py at lines 205 and 223, where crc16.crc16xmodem is called, and compare the behavior under Python 3.8 versus Python 3.6. Investigate the crc16 module compatibility and determine whether the warnings are expected; done means the cause and any required change or documentation are established.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.