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

Use getargspec only with Python 2, fix for Kodi 20 #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

antonsoroko
Copy link

Found small error in "compatibility" code: it used to work for python 3 since getargspec still existed until Python 3.11.
But Kodi 20 uses Python 3.11 - thus addon does not work anymore:

File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.cherrypy/lib/cherrypy/_cpdispatch.py", line 209, in <module>
  getargspec = inspect.getargspec
               ^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'

Fix tested on python 2 and 3.

https://docs.python.org/3/whatsnew/3.11.html#removed

https://docs.python.org/2/library/inspect.html#inspect.getargspec
https://docs.python.org/3/library/inspect.html#inspect.getfullargspec

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

Successfully merging this pull request may close these issues.

1 participant