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

Crashes on init (AttributeError: 'str' object has no attribute '__code__') #103

Closed
snan opened this issue Jan 5, 2022 · 3 comments
Closed

Comments

@snan
Copy link

snan commented Jan 5, 2022

Traceback (most recent call last):
  File "/usr/local/bin/simplebot", line 33, in <module>
    sys.exit(load_entry_point('simplebot', 'console_scripts', 'simplebot')())
  File "/home/sandra/py/simplebot/src/simplebot/main.py", line 22, in main
    bot = make_bot_from_args(args, plugin_manager=pm)
  File "/home/sandra/py/simplebot/src/simplebot/main.py", line 37, in make_bot_from_args
    return DeltaBot(account, logger, plugin_manager=plugin_manager, args=args)
  File "/home/sandra/py/simplebot/src/simplebot/bot.py", line 185, in __init__
    plugin_manager.hook.deltabot_init.call_historic(
  File "/usr/local/lib/python3.9/dist-packages/pluggy/_hooks.py", line 277, in call_historic
    res = self._hookexec(self.name, self.get_hookimpls(), kwargs, False)
  File "/usr/local/lib/python3.9/dist-packages/pluggy/_manager.py", line 80, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  File "/usr/local/lib/python3.9/dist-packages/pluggy/_callers.py", line 60, in _multicall
    return outcome.get_result()
  File "/usr/local/lib/python3.9/dist-packages/pluggy/_result.py", line 60, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/usr/local/lib/python3.9/dist-packages/pluggy/_callers.py", line 39, in _multicall
    res = hook_impl.function(*args)
  File "/home/sandra/py/simplebot_xmpp/simplebot_xmpp/__init__.py", line 33, in deltabot_init
    bot.commands.register("/xmpp_bridge", cmd_bridge)
  File "/home/sandra/py/simplebot/src/simplebot/commands.py", line 39, in register
    short, long, args = parse_command_docstring(
  File "/home/sandra/py/simplebot/src/simplebot/commands.py", line 162, in parse_command_docstring
    funcargs = set(inspect.getargs(func.__code__).args)
AttributeError: 'str' object has no attribute '__code__'

This is after pip installing the git repo versions (as opposed to the releases package) of simplebot and simplebot_xmpp, and then this happens on simplebot init address password

@adbenitez
Copy link
Member

hi @snan, the issue is that the simplebot_xmpp plugin is REALLY outdated and incomplete, so it is incompatible with current versions of simplebot, please don't use it, sorry for the troubles

@snan
Copy link
Author

snan commented Jan 7, 2022

Which plugins are current?

@adbenitez
Copy link
Member

anyone that doesn't say the contrary, in this case it was my bad, I forgot to say so in the repo, also you can check if the CI is passing/green (badge in the README) or check the requirements file to see what version of simplebot was used by the plugin creator

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

2 participants