tgalal / yowsup

The WhatsApp lib
GNU General Public License v3.0
7.02k stars 2.23k forks source link

AttributeError: module 'inspect' has no attribute 'getargspec' #3254

Open vitoller opened 4 months ago

vitoller commented 4 months ago

Describe the bug

when trying to use the command line interface (on Ubuntu 23.10) yowsup-cli demos -y -c

I get the following error: AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?

Debug output

Traceback (most recent call last):
  File "/usr/local/bin/yowsup-cli", line 4, in <module>
    __import__('pkg_resources').run_script('yowsup==3.3.0', 'yowsup-cli')
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 722, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1561, in run_script
    exec(code, namespace, namespace)
  File "/usr/local/lib/python3.11/dist-packages/yowsup-3.3.0-py3.11.egg/EGG-INFO/scripts/yowsup-cli", line 722, in <module>
    if not parser.process():
           ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/yowsup-3.3.0-py3.11.egg/EGG-INFO/scripts/yowsup-cli", line 606, in process
    self.startCmdline()
  File "/usr/local/lib/python3.11/dist-packages/yowsup-3.3.0-py3.11.egg/EGG-INFO/scripts/yowsup-cli", line 629, in startCmdline
    stack = cli.YowsupCliStack(self._profile)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/yowsup-3.3.0-py3.11.egg/yowsup/demos/cli/stack.py", line 15, in __init__
    .build()
     ^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/yowsup-3.3.0-py3.11.egg/yowsup/stacks/yowstack.py", line 66, in build
    return YowStack(self.layers, reversed = False, props = self._props)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/yowsup-3.3.0-py3.11.egg/yowsup/stacks/yowstack.py", line 134, in __init__
    self._construct()
  File "/usr/local/lib/python3.11/dist-packages/yowsup-3.3.0-py3.11.egg/yowsup/stacks/yowstack.py", line 211, in _construct
    inst = s()
           ^^^
  File "/usr/local/lib/python3.11/dist-packages/yowsup-3.3.0-py3.11.egg/yowsup/demos/cli/layer.py", line 48, in __init__
    super(YowsupCliLayer, self).__init__()
  File "/usr/local/lib/python3.11/dist-packages/yowsup-3.3.0-py3.11.egg/yowsup/demos/cli/cli.py", line 49, in __init__
    "args": inspect.getargspec(fn)[0][1:],
            ^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?

Config file

I believe it it not related to the config - let me know if i should post a topic

Versions

repository commit hash: dd47d57a950964bab0c4715e9d56fd8450bc94e2

yowsup-cli v3.2.1
using:
  yowsup v3.3.0
  consonance v0.1.5
  dissononce v0.34.3
  python-axolotl v0.2.2
  cryptography v38.0.4
  protobuf v4.21.12

To Reproduce

run: yowsup-cli demos -y -c

Expected behavior

no error - as I understand it getargspec was removed in python 3.11

OS (please complete the following information): Ubuntu 23.10

Additional context Add any other context about the problem here.