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

module inspect has no argument getargspec - headphones does not start - Fedora 37 - python 3.11 #3320

Closed
VGerris opened this issue Mar 3, 2023 · 8 comments

Comments

@VGerris
Copy link

VGerris commented Mar 3, 2023

workaround example:
pyinvoke/invoke#833 (comment)
I implemented it in "/opt/headphones/lib/cherrypy/_cpdispatch.py", line 209

python3 Headphones.py
Traceback (most recent call last):
File "/opt/headphones/Headphones.py", line 27, in
from headphones import webstart, logger
File "/opt/headphones/headphones/init.py", line 27, in
import cherrypy
File "/opt/headphones/lib/cherrypy/init.py", line 71, in
from . import _cpdispatch as dispatch
File "/opt/headphones/lib/cherrypy/_cpdispatch.py", line 209, in
getargspec = inspect.getargspec
^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?

Apply the fix and it works but now it crashes as above

@chaddoncooper
Copy link

Applying cherrypy/cherrypy@8245a74 (or use the latest package) and extracting the apscheduler-3.10.1 was enough to get my install working.

@rembo10
Copy link
Owner

rembo10 commented Apr 20, 2023

Applying cherrypy/cherrypy@8245a74 (or use the latest package) and extracting the apscheduler-3.10.1 was enough to get my install working.

I've updated the cherrypy lib to v18.8.0 (which includes this patch) in the develop branch if you want to give it a try

@OneCDOnly
Copy link

Getting the same error here after upgrading from Python 3.10.7 to 3.11.3.

Running HeadPhones from master branch on a QNAP NAS:

exec: '. /share/CACHEDEV2_DATA/.qpkg/Headphones/venv/bin/activate && cd /share/CACHEDEV2_DATA/.qpkg/Headphones/repo-cache && /share/CACHEDEV2_DATA/.qpkg/Headphones/venv/bin/python3 /share/CACHEDEV2_DATA/.qpkg/Headphones/repo-cache/Headphones.py --daemon --nolaunch --datadir /share/CACHEDEV2_DATA/.qpkg/Headphones/config --config /share/CACHEDEV2_DATA/.qpkg/Headphones/config/config.ini --pidfile /var/run/Headphones.pid'
Traceback (most recent call last):
  File "/share/CACHEDEV2_DATA/.qpkg/Headphones/repo-cache/Headphones.py", line 27, in <module>
    from headphones import webstart, logger
  File "/share/CACHEDEV2_DATA/.qpkg/Headphones/repo-cache/headphones/__init__.py", line 27, in <module>
    import cherrypy
  File "/share/CACHEDEV2_DATA/.qpkg/Headphones/repo-cache/lib/cherrypy/__init__.py", line 71, in <module>
    from . import _cpdispatch as dispatch
  File "/share/CACHEDEV2_DATA/.qpkg/Headphones/repo-cache/lib/cherrypy/_cpdispatch.py", line 209, in <module>
    getargspec = inspect.getargspec
                 ^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?

So, I switched to the develop branch instead, but then got this:

exec: '. /share/CACHEDEV2_DATA/.qpkg/Headphones/venv/bin/activate && cd /share/CACHEDEV2_DATA/.qpkg/Headphones/repo-cache && /share/CACHEDEV2_DATA/.qpkg/Headphones/venv/bin/python3 /share/CACHEDEV2_DATA/.qpkg/Headphones/repo-cache/Headphones.py --daemon --nolaunch --datadir /share/CACHEDEV2_DATA/.qpkg/Headphones/config --config /share/CACHEDEV2_DATA/.qpkg/Headphones/config/config.ini --pidfile /var/run/Headphones.pid'
Traceback (most recent call last):
  File "/share/CACHEDEV2_DATA/.qpkg/Headphones/repo-cache/Headphones.py", line 27, in <module>
    from headphones import webstart, logger
  File "/share/CACHEDEV2_DATA/.qpkg/Headphones/repo-cache/headphones/__init__.py", line 28, in <module>
    from apscheduler.schedulers.background import BackgroundScheduler
  File "/share/CACHEDEV2_DATA/.qpkg/Headphones/repo-cache/lib/apscheduler/schedulers/background.py", line 4, in <module>
    from apscheduler.schedulers.base import BaseScheduler
  File "/share/CACHEDEV2_DATA/.qpkg/Headphones/repo-cache/lib/apscheduler/schedulers/base.py", line 17, in <module>
    from apscheduler.jobstores.memory import MemoryJobStore
  File "/share/CACHEDEV2_DATA/.qpkg/Headphones/repo-cache/lib/apscheduler/jobstores/memory.py", line 4, in <module>
    from apscheduler.util import datetime_to_utc_timestamp
  File "/share/CACHEDEV2_DATA/.qpkg/Headphones/repo-cache/lib/apscheduler/util.py", line 5, in <module>
    from inspect import isfunction, ismethod, getargspec
ImportError: cannot import name 'getargspec' from 'inspect' (/opt/lib/python3.11/inspect.pyc)
[~] # . /share/CACHEDEV2_DATA/.qpkg/Headphones/venv/bin/activate
(venv) [~] # pip list
Package      Version
------------ -------
distlib      0.3.6
filelock     3.12.0
pip          23.1.2
platformdirs 3.5.1
setuptools   67.7.2
virtualenv   20.23.0
wheel        0.40.0

Any suggestions please? :)

@rembo10
Copy link
Owner

rembo10 commented Jun 9, 2023

Hi, I've updated the apscheduler lib in the develop branch

@OneCDOnly
Copy link

Hi @rembo10, any idea how I can get the master branch to run on Python 3.11?

Or should I switch to develop?

Thank you.

@oztrich
Copy link

oztrich commented Nov 2, 2023

I've hit this issue since upgrading to Ubuntu 23.04. My headphones service wasn't starting, so I've tried clearing out the headphones install and starting from scratch. I get this when trying to run headphones the first time:

`python3 Headphones.py

Traceback (most recent call last):
File "/opt/headphones/Headphones.py", line 27, in
from headphones import webstart, logger
File "/opt/headphones/headphones/init.py", line 27, in
import cherrypy
File "/opt/headphones/lib/cherrypy/init.py", line 71, in
from . import _cpdispatch as dispatch
File "/opt/headphones/lib/cherrypy/_cpdispatch.py", line 209, in
getargspec = inspect.getargspec
^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?
`

I have Python 3.11.4 installed.

Any ideas on how I get the new install working would be gratefully received. :)

@rembo10
Copy link
Owner

rembo10 commented Nov 26, 2023

Hey so sorry about this. It's now in the master branch with a new release (v0.6.1)

@rembo10 rembo10 closed this as completed Nov 26, 2023
@oztrich
Copy link

oztrich commented Nov 26, 2023

Hey so sorry about this. It's now in the master branch with a new release (v0.6.1)

No worries, looks to be working now, thank you so much!

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