poljar / weechat-matrix

Weechat Matrix protocol script written in python
Other
960 stars 121 forks source link

Crash on load #295

Closed kugel- closed 3 years ago

kugel- commented 3 years ago

Hello. Since recently I get this backtrace. I'm unable to use matrix in weechat currently.

Not sure when it started, probably after a recent apt upgrade

                │09:01:04       kugel  -- | matrix: Connected using TLSv1.3, and 256 bit TLS_AES_256_GCM_SHA384 cipher suite.
                │09:01:04       kugel  -- | matrix: received certificate
                │09:01:04       kugel     |  - certificate info:
                │09:01:04       kugel     |     - subject: commonName=XXX, serial number
                │09:01:04       kugel     |         032273D66138F4DBD35596E6754A1D370B98
                │09:01:04       kugel     |     - issuer: countryName=US, organizationName=Let's Encrypt,
                │09:01:04       kugel     |         commonName=R3
                │09:01:04       kugel     |     - key info: RSA key 2048 bits, signed using
                │09:01:04       kugel     |         sha256WithRSAEncryption
                │09:01:04       kugel     |     - period of validity:
                │09:01:04       kugel     |         Begins on:  Sep  9 19:49:43 2021 GMT
                │09:01:04       kugel     |         Expires on: Dec  8 19:49:42 2021 GMT
                │09:01:04       kugel     |     - fingerprints:
                │09:01:04       kugel     |         SHA1:   65:D4:89:61:2C:97:30:31:63:87:4E:D6:BB:29:81:00:F3:4B:A4:17
                │09:01:04       kugel     |         SHA256: E5:73:60:A6:F5:C5:33:0B:8A:4D:5B:85:B9:02:3E:2D:C0:76:0C:CD:0D:89:CB:BE:58:18:56:AD:46:47:2A:1E
                │09:01:04       kugel  -- | matrix: Logging in...
                │09:01:05        weechat     | script: 367 Skripten für WeeChat 2.8
                │09:01:05       kugel  -- | matrix: Logged in as XXX
                │09:01:07        weechat     | python: stdout/stderr: (matrix): Traceback (most recent call last):
                │09:01:07        weechat     | python: stdout/stderr: (matrix):   File "/home/kugel/.weechat/python/matrix/utf.py", line 89, in wrapper
                │09:01:07        weechat     | python: stdout/stderr: (matrix):     return function(*args, **kwargs)
                │09:01:07        weechat     | python: stdout/stderr: (matrix):   File "/home/kugel/.weechat/python/autoload/matrix.py", line 332, in receive_cb
                │09:01:07        weechat     | python: stdout/stderr: (matrix):     response = server.client.next_response()
                │09:01:07        weechat     | python: stdout/stderr: (matrix):   File "/home/kugel/.local/lib/python3.8/site-packages/nio/client/http_client.py", line 1337, in next_response
                │09:01:07        weechat     | python: stdout/stderr: (matrix):     response = self._create_response(
                │09:01:07        weechat     | python: stdout/stderr: (matrix):   File "/home/kugel/.local/lib/python3.8/site-packages/nio/client/http_client.py", line 1261, in _create_response
                │09:01:07        weechat     | python: stdout/stderr: (matrix):     response = request_class.from_dict(parsed_dict, *extra_data)
                │09:01:07        weechat     | python: stdout/stderr: (matrix):   File "/home/kugel/.local/lib/python3.8/site-packages/nio/responses.py", line 167, in wrapper
                │09:01:07        weechat     | python: stdout/stderr: (matrix):     return f(cls, parsed_dict, *args, **kwargs)
                │09:01:07        weechat     | python: stdout/stderr: (matrix):   File "/home/kugel/.local/lib/python3.8/site-packages/nio/responses.py", line 1756, in from_dict
                │09:01:07        weechat     | python: stdout/stderr: (matrix):     parsed_dict["device_lists"]["left"],
                │09:01:07        weechat     | python: stdout/stderr: (matrix): KeyError: 'left'
                │09:01:07        weechat =!= | python: Fehler in Funktion "receive_cb"

System Info: Ubuntu Linux 20.04 weechat v2.8-1 (from Ubuntu packages) weechat-matrix 0.3.0 (from git)

weechatter commented 3 years ago

I am not very familiar with matrix, but you should upgrade your weechat to latest version (3.3). https://weechat.org/download/debian/

I would guess its a problem with python version. You can see the python version weechat is linked with using: /python version or /debug libs

Latest weechat is using python3 (see https://weechat.org/scripts/python3/) you can also join libera.#weechat-de ;-)

poljar commented 3 years ago

Duplicate of #284, upgrade matrix-nio.

kugel- commented 3 years ago

Confirmed, thanks. I upgraded to 0.18.7 and it works now.

@weechatter thanks for the hint, I now installed weechat from that repository.