pymavlink icon indicating copy to clipboard operation
pymavlink copied to clipboard

Invalid syntax

Open anunarayan13 opened this issue 2 years ago • 4 comments

from pymavlink.dialects.v10 import ardupilotmega as MAV_APM File "/usr/local/lib/python2.7/dist-packages/pymavlink-2.4.39-py2.7.egg/pymavlink/dialects/v10/ardupilotmega.py", line 56 def init(self, buf: Optional[Sequence[int]] = None) -> None: ^ SyntaxError: invalid syntax

Please resolve

anunarayan13 avatar Aug 11 '23 07:08 anunarayan13

From your path it looks like you are using python2.7 - the website suggests that pymavlink is only supported from Python 3.5 onwards, so maybe this is the reason. (to be confirmed by someone more authoritative than me...)

shancock884 avatar Dec 17 '23 14:12 shancock884

pymavlink is used by dronekit and there is only 2.7 python supported(( I don't now why the support for py2 in the pymavlink is removed(

Menny11 avatar Dec 19 '23 03:12 Menny11

py2 is deprecatead since some years already and it become too hard to maintain compatiblity with it as most project are dropping py2, so ArduPilot move to python3 only and update most of its tools for this.

khancyr avatar Dec 19 '23 10:12 khancyr

please run this command on your terminal to using pymavlink 2.4.37. it going to fix your problem.

pip install --force-reinstall -v "pymavlink==2.4.37"

furkanisikay avatar Jan 28 '24 20:01 furkanisikay