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

inspect.getargspec code change required for python 3.11 #13

Closed
mdickers47 opened this issue Sep 22, 2023 · 1 comment
Closed

inspect.getargspec code change required for python 3.11 #13

mdickers47 opened this issue Sep 22, 2023 · 1 comment

Comments

@mdickers47
Copy link

Line 231 of pyfirmata2.py calls inspect.getargspec, which was apparently deprecated since at least 2018: pytorch/pytorch#15344

It now doesn't run in python 3.11:

  File "/home/mikey/tmp/pyduino/lib/python3.11/site-packages/pyfirmata2/pyfirmata2.py", line 231, in add_cmd_handler
    len_args = len(inspect.getargspec(func)[0])
                   ^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?

Changing the line to getfullargspec() seems to solve it.

berndporr added a commit that referenced this issue Nov 2, 2023
replaced with getfullargspec as suggested by
@mdickers47 in #13
@mdickers47
Copy link
Author

great, thanks!

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

2 participants