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

AttributeError in the 'invoke' dependency when using Python >=3.11 #6

Closed
DistantVoyager opened this issue Nov 3, 2022 · 1 comment

Comments

@DistantVoyager
Copy link

When doing the tutorial with Python version 3.11, encountered the following error when running invoke build debug:

File "...\Lib\site-packages\invoke\tasks.py", line 153, in argspec
    spec = inspect.getargspec(func)
           ^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?

Error is related to this issue (pyinvoke/invoke#833) in the 'invoke' Python library where the function getargspec (deprecated and now removed in Python 3.11) for the 'inspect' module is being called.

As a workaround until the 'invoke' library is updated to handle the new function, getfullargspec (https://docs.python.org/3.11/library/inspect.html), you can just modify the line in "...\Lib\site-packages\invoke\tasks.py" to:

spec = inspect.getfullargspec(func)
@DistantVoyager DistantVoyager changed the title 'AttributeError' in the 'invoke' dependency when using Python >=3.11 AttributeError in the 'invoke' dependency when using Python >=3.11 Nov 3, 2022
@DistantVoyager
Copy link
Author

pyinvoke/invoke#833 (comment)

Closed as the issue has now been solved in invoke.

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

1 participant