8go/matrix-commander

E248 error when providing wrong password at login

Closed this issue · 1 comments

When using the command "--login password" and providing all the proper information except an invalid password, I get en error 248 instead of, most likely, an error 234.

Here is the traceback.
Traceback (most recent call last):
File "/matrix-commander/venv/lib/python3.9/site-packages/matrix_commander/matrix_commander.py", line 8912, in main
main_inner(argv)
File "/matrix-commander/venv/lib/python3.9/site-packages/matrix_commander/matrix_commander.py", line 8861, in main_inner
asyncio.run(async_main()) # do everything in the event loop
File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/matrix-commander/venv/lib/python3.9/site-packages/matrix_commander/matrix_commander.py", line 6111, in async_main
await action_login() # explicit login
File "/matrix-commander/venv/lib/python3.9/site-packages/matrix_commander/matrix_commander.py", line 6059, in action_login
f"Failed to log in: {privacy_filter(str(resp))}"
File "/matrix-commander/venv/lib/python3.9/site-packages/matrix_commander/matrix_commander.py", line 305, in privacy_filter
return dirty.replace(gs.credentials["access_token"], "***")
TypeError: 'NoneType' object is not subscriptable

2023-03-25 22:04:39,884: INFO: matrix-commander: 2 errors and 0 warnings occurred.

Based on what I see, the function privacy_filter is the source of the problem. Do you think it could be corrected to handle this case properly ?

8go commented

Thanks @GoodOldAbe for pointing it out.
Fixed, see commit 2187fd7

Test it and report back if there is still a problem.