Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid syntax #849

Open
anunarayan13 opened this issue Aug 11, 2023 · 4 comments
Open

Invalid syntax #849

anunarayan13 opened this issue Aug 11, 2023 · 4 comments

Comments

@anunarayan13
Copy link

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

@shancock884
Copy link
Contributor

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...)

@Menny11
Copy link

Menny11 commented Dec 19, 2023

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(

@khancyr
Copy link
Contributor

khancyr commented Dec 19, 2023

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.

@furkanisikay
Copy link

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants