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

simplebot init fails with "AssertionError: plugin is not registered" #144

Closed
sysfu opened this issue Nov 28, 2023 · 3 comments · Fixed by #145
Closed

simplebot init fails with "AssertionError: plugin is not registered" #144

sysfu opened this issue Nov 28, 2023 · 3 comments · Fixed by #145
Labels
bug Something isn't working

Comments

@sysfu
Copy link

sysfu commented Nov 28, 2023

I'm following the guide posted in the Delta Chat support forum here.

After attempting to initialize the bot it fails with the "AssertionError: plugin is not registered" traceback.

I have reproduced this issue on gentoo, guix and ubuntu systems which have the latest updates.

$ simplebot --stdlog debug init $ADDR "$PASSWORD"
2023-11-27 13:57:56,965 - simplebot - DEBUG - registering plugin 'commands'
2023-11-27 13:57:56,965 - simplebot - DEBUG - registering plugin 'filters'
2023-11-27 13:57:56,982 - simplebot - DEBUG - registering plugin 'db'
2023-11-27 13:57:56,982 - simplebot - DEBUG - registered new command '/sub'
2023-11-27 13:57:56,982 - simplebot - DEBUG - registered new command '/unsub'
2023-11-27 13:57:56,983 - simplebot - DEBUG - registered new command '/help'
2023-11-27 13:57:56,983 - simplebot - DEBUG - registered new command '/unban'
2023-11-27 13:57:56,983 - simplebot - DEBUG - registered new command '/ban'
2023-11-27 13:57:56,983 - simplebot - DEBUG - registered new command '/set'
2023-11-27 13:57:56,983 - simplebot - DEBUG - registered new command '/echo'
2023-11-27 13:57:56,983 - simplebot - DEBUG - registered new filter 'simplebot_echo.echo_filter'
2023-11-27 13:58:58,034 - simplebot - INFO - Successfully configured bot@domain.tld
Traceback (most recent call last):
  File "/home/user/.local/bin/simplebot", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/simplebot/main.py", line 24, in main
    parser.main_run(bot=bot, args=args)
  File "/home/user/.local/lib/python3.11/site-packages/simplebot/parser.py", line 111, in main_run
    res = args.subcommand_instance.run(**kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/simplebot/builtin/cmdline.py", line 152, in run
    success = bot.perform_configure_address(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/simplebot/bot.py", line 383, in perform_configure_address
    with self.account.temp_plugin(tracker) as configtracker:
  File "/usr/lib/python3.11/contextlib.py", line 144, in __exit__
    next(self.gen)
  File "/home/user/.local/lib/python3.11/site-packages/deltachat/account.py", line 671, in temp_plugin
    self._pm.unregister(plugin)
  File "/usr/lib/python3.11/site-packages/pluggy/_manager.py", line 206, in unregister
    assert name is not None, "plugin is not registered"
           ^^^^^^^^^^^^^^^^
AssertionError: plugin is not registered
@nudeldudel
Copy link

nudeldudel commented Mar 10, 2024

Me too.

Traceback (most recent call last):
File "/root/sendbot/venv/bin/simplebot", line 8, in
sys.exit(main())
^^^^^^
File "/root/sendbot/venv/lib/python3.11/site-packages/simplebot/main.py", line 24, in main
parser.main_run(bot=bot, args=args)
File "/root/sendbot/venv/lib/python3.11/site-packages/simplebot/parser.py", line 111, in main_run
res = args.subcommand_instance.run(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/sendbot/venv/lib/python3.11/site-packages/simplebot/builtin/cmdline.py", line 152, in run
success = bot.perform_configure_address(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/sendbot/venv/lib/python3.11/site-packages/simplebot/bot.py", line 383, in perform_configure_address
with self.account.temp_plugin(tracker) as configtracker:
File "/usr/lib/python3.11/contextlib.py", line 144, in exit
next(self.gen)
File "/root/sendbot/venv/lib/python3.11/site-packages/deltachat/account.py", line 671, in temp_plugin
self._pm.unregister(plugin)
File "/root/sendbot/venv/lib/python3.11/site-packages/pluggy/_manager.py", line 206, in unregister
assert name is not None, "plugin is not registered"
^^^^^^^^^^^^^^^^
AssertionError: plugin is not registered

@dillfrescott
Copy link

Same

@adbenitez adbenitez added the bug Something isn't working label Mar 28, 2024
@adbenitez
Copy link
Member

adbenitez commented Mar 28, 2024

hello, (sorry the late reply @sysfu, @nudeldudel) I fixed the issue and released v4.1.2 to upgrade:

pip install -U simplebot

then try again and the simplebot init step will work now

note: if you are looking into creating new bots, don't use simplebot library, use this library instead: https://github.com/deltachat-bot/deltabot-cli-py, only use simplebot if your intention is to host some bot with a simplebot plugin that already exist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants