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

matrix-commander --devices E215: Error during room, set, get actions. Continuing despite error. Exception: can only concatenate str (not "NoneType") to str #18

Open
Benjamin-Loison opened this issue Jun 27, 2024 · 2 comments
Assignees

Comments

@Benjamin-Loison
Copy link
Owner

Benjamin-Loison commented Jun 27, 2024

matrix-commander --devices
2024-06-27 20:57:36,668:    ERROR: matrix-commander: E215: Error during room, set, get actions. Continuing despite error. Exception: can only concatenate str (not "NoneType") to str
2024-06-27 20:57:36,670:     INFO: matrix-commander: 1 error and 0 warnings occurred.

On OC3K benjamin.

matrix-commander -h
--devices, --get-devices
  Print the list of devices.
@Benjamin-Loison
Copy link
Owner Author

On LemnosLife VPS:

find / -name 'matrix_commander.py' 2> /dev/null
/usr/local/lib/python3.9/dist-packages/matrix_commander/matrix_commander.py
/usr/local/lib/python3.11/dist-packages/matrix_commander/matrix_commander.py

@Benjamin-Loison
Copy link
Owner Author

Benjamin-Loison commented Jun 28, 2024

rr.id='CENSORED'
rr.display_name='CENSORED'
type(rr.last_seen_ip)=<class 'str'>
rr.last_seen_ip='CENSORED'
type(rr.last_seen_date)=<class 'datetime.datetime'>
rr.last_seen_date=datetime.datetime(CENSORED)
rr.id='CENSORED'
rr.display_name='CENSORED'
type(rr.last_seen_ip)=<class 'NoneType'>
rr.last_seen_ip=None
type(rr.last_seen_date)=<class 'NoneType'>
rr.last_seen_date=None
rr.id='CENSORED'
rr.display_name='CENSORED'
type(rr.last_seen_ip)=<class 'str'>
rr.last_seen_ip='CENSORED'
type(rr.last_seen_date)=<class 'datetime.datetime'>
rr.last_seen_date=datetime.datetime(CENSORED)

I have 3 devices with both rr.last_seen_{ip,date} None they are matrix-commander on Termux and Ubuntu server and app.element.io.

Adding --debug provides the traceback (hence avoid above find) and with:

4570a4571,4576
>             gs.log.debug(f'{rr.id=}')
>             gs.log.debug(f'{rr.display_name=}')
>             gs.log.debug(f'{type(rr.last_seen_ip)=}')
>             gs.log.debug(f'{rr.last_seen_ip=}')
>             gs.log.debug(f'{type(rr.last_seen_date)=}')
>             gs.log.debug(f'{rr.last_seen_date=}')

8go@5b94b04

is the first commit about rr.last_seen_date but it does not explain why it uses str.

diff matrix_commander.py /usr/local/lib/python3.11/dist-packages/matrix_commander/matrix_commander.py
4576c4576
<                 + rr.last_seen_ip
---
>                 + str(rr.last_seen_ip)

solves the issue.

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

1 participant