Skip to content

ERROR:root:{'code': -1, 'message': 'Failed to load key: No self addr configured'} #31

@stbaeumer

Description

@stbaeumer

I started from scratch:

stefan@fedora:~$ git clone https://github.com/deltachat-bot/team-bot
cd team-bot
pip install .
Klone nach 'team-bot'...
remote: Enumerating objects: 858, done.
remote: Counting objects: 100% (223/223), done.
remote: Compressing objects: 100% (122/122), done.
remote: Total 858 (delta 111), reused 116 (delta 88), pack-reused 635 (from 1)
Empfange Objekte: 100% (858/858), 235.78 KiB | 6.20 MiB/s, fertig.
Löse Unterschiede auf: 100% (469/469), fertig.
Defaulting to user installation because normal site-packages is not writeable
Processing /home/stefan/team-bot
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: deltachat-rpc-client==2.40.0 in /home/stefan/.local/lib/python3.14/site-packages (from team-bot==2.40.0) (2.40.0)
Requirement already satisfied: deltachat-rpc-server==2.40.0 in /home/stefan/.local/lib/python3.14/site-packages (from team-bot==2.40.0) (2.40.0)
Requirement already satisfied: pickledb==0.9 in /home/stefan/.local/lib/python3.14/site-packages (from team-bot==2.40.0) (0.9)
Requirement already satisfied: qrcode>=8.2 in /home/stefan/.local/lib/python3.14/site-packages (from team-bot==2.40.0) (8.2)
Building wheels for collected packages: team-bot
  Building wheel for team-bot (pyproject.toml) ... done
  Created wheel for team-bot: filename=team_bot-2.40.0-py3-none-any.whl size=15036 sha256=4df6ceda6e601ed9d8e8c9b89437abc0eade8364fea3121975b78ca267dd4106
  Stored in directory: /home/stefan/.cache/pip/wheels/10/15/90/40c4b406fe4be97d4d91f493a7783fbbc5307c254a64c5e762
Successfully built team-bot
Installing collected packages: team-bot
  Attempting uninstall: team-bot
    Found existing installation: team-bot 2.40.0
    Uninstalling team-bot-2.40.0:
      Successfully uninstalled team-bot-2.40.0
Successfully installed team-bot-2.40.0

Using mailbox.org with user-password:

stefan@fedora:~/team-bot$ team-bot --email hello@mailbox.org --password topsecret
No --dbdir specified, using the default directory: /home/stefan/team-bot/.config/team-bot/
ERROR:root:{'code': -1, 'message': 'Failed to load key: No self addr configured'}
Traceback (most recent call last):
  File "/home/stefan/.local/lib/python3.14/site-packages/team_bot/setup.py", line 39, in catch_events
    log.debug(f"Crew invite already created: {event.account.crew_invite}")
                                              ^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Account' object has no attribute 'crew_invite'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/stefan/.local/lib/python3.14/site-packages/deltachat_rpc_client/client.py", line 136, in _on_event
    hook(event)
    ~~~~^^^^^^^
  File "/home/stefan/.local/lib/python3.14/site-packages/team_bot/setup.py", line 41, in catch_events
    invite_link = get_crew_invite(event.account)
  File "/home/stefan/.local/lib/python3.14/site-packages/team_bot/util.py", line 27, in get_crew_invite
    crew_invite = account.get_qr_code()
  File "/home/stefan/.local/lib/python3.14/site-packages/deltachat_rpc_client/account.py", line 373, in get_qr_code
    return self._rpc.get_chat_securejoin_qr_code(self.id, None)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/home/stefan/.local/lib/python3.14/site-packages/deltachat_rpc_client/rpc.py", line 30, in __call__
    return future()
  File "/home/stefan/.local/lib/python3.14/site-packages/deltachat_rpc_client/rpc.py", line 48, in rpc_future
    raise JsonRpcError(response["error"])
deltachat_rpc_client.rpc.JsonRpcError: {'code': -1, 'message': 'Failed to load key: No self addr configured'}

Please scan this qr code with Delta Chat to verify the bot:

Despite the exceptions the qr-code is shown. When stopping with Ctrl+c this happens:

Or click this invite link: https://i.delta.chat/#4113649CA8B22E60903791B437AB0AAD683E7A57&i=b5spUKmaZiLrfkYNsD-ZuEWS&s=74XH-Zli1pizaFi2VXog6HJU&a=deltaa%40mailbox.org&n=
^CTraceback (most recent call last):
  File "/home/stefan/.local/bin/team-bot", line 8, in <module>
    sys.exit(main())
             ~~~~^^
  File "/home/stefan/.local/lib/python3.14/site-packages/team_bot/main.py", line 93, in main
    accounts_dir = run_bot(
        log,
    ...<4 lines>...
        hooks=setuphooks,
    )
  File "/home/stefan/.local/lib/python3.14/site-packages/team_bot/main.py", line 72, in run_bot
    client.run_until(until)
    ~~~~~~~~~~~~~~~~^^^^^^^
  File "/home/stefan/.local/lib/python3.14/site-packages/deltachat_rpc_client/client.py", line 103, in run_until
    return self._process_events(until_func=func)  # Loop over incoming events
           ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/home/stefan/.local/lib/python3.14/site-packages/deltachat_rpc_client/client.py", line 118, in _process_events
    event = self.account.wait_for_event()
  File "/home/stefan/.local/lib/python3.14/site-packages/deltachat_rpc_client/account.py", line 35, in wait_for_event
    next_event = AttrDict(self._rpc.wait_for_event(self.id))
                          ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/home/stefan/.local/lib/python3.14/site-packages/deltachat_rpc_client/rpc.py", line 173, in wait_for_event
    return queue.get()
           ~~~~~~~~~^^
  File "/usr/lib64/python3.14/queue.py", line 199, in get
    self.not_empty.wait()
    ~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib64/python3.14/threading.py", line 369, in wait
    waiter.acquire()
    ~~~~~~~~~~~~~~^^
KeyboardInterrupt

Connecting again with a fake password seems to work

stefan@fedora:~/team-bot$ team-bot --email deltaa@mailbox.org --password fake-password
No --dbdir specified, using the default directory: /home/stefan/team-bot/.config/team-bot/

Please scan this qr code with Delta Chat to verify the bot:

Connection with real credentials seems to work either, but when clicking invite link the connection is always pending.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions