stuartlangridge / hushboard

Mute your mic while you're typing. An app for Ubuntu.
https://kryogenix.org/code/hushboard/
MIT License
146 stars 13 forks source link

Runtime error: "AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?" - from source code, on Manjaro #28

Open peter-lyons-kehl opened 8 months ago

peter-lyons-kehl commented 8 months ago

Hi Stuart @stuartlangridge, FYI Jeffrey @jbouter,

Summary: Error message exact as in #27, BUT with a different stack trace. Running from current main (5d62c2aacb876f7178d8002a22e44128ac312c98), on current Manjaro x64 Linux (after I've uninstalled the AUR-packed installation from #27). Same OS as in #27 (Python 3.11.7).

❯ git clone https://github.com/stuartlangridge/hushboard
Cloning into 'hushboard'...
remote: Enumerating objects: 175, done.
...

❯ cd hushboard/

❯ python3 -m hushboard
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/share/pkehl/GIT/hushboard/hushboard/__main__.py", line 7, in <module>
    from . import pulsectl
  File "/share/pkehl/GIT/hushboard/hushboard/pulsectl.py", line 334, in <module>
    class Pulse(object):
  File "/share/pkehl/GIT/hushboard/hushboard/pulsectl.py", line 604, in Pulse
    card_profile_set_by_index = _pulse_method_call(
                                ^^^^^^^^^^^^^^^^^^^
  File "/share/pkehl/GIT/hushboard/hushboard/pulsectl.py", line 596, in _pulse_method_call
    func_args = list(inspect.getargspec(func or (lambda: None)))
                     ^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?

I DO have the following Python modules installed already with Pacman/pamac, from Arch/Manjaro ("extra" repository):

python-cairo 1.26.0-1
python-gobject 3.46.0-1
python-six 1.16.0-8
python-xlib 0.33-2

Note that the above versions are ones of AUR packages. Usually they are the same as the actual library/software version, but they may vary. If you'd like me to check anything, suggest commands, please.

rrthomas commented 2 months ago

30 fixes this.