Skip to content
This repository has been archived by the owner on Oct 24, 2018. It is now read-only.

Unexpected error receiving message #46

Open
turt2live opened this issue Oct 31, 2017 · 1 comment
Open

Unexpected error receiving message #46

turt2live opened this issue Oct 31, 2017 · 1 comment

Comments

@turt2live
Copy link

ERROR:aiohttp.web:Error handling request
Traceback (most recent call last):
  File "/root/telematrix/venv/lib/python3.5/site-packages/aiohttp/server.py", line 261, in start
    yield from self.handle_request(message, payload)
  File "/root/telematrix/venv/lib/python3.5/site-packages/aiohttp/web.py", line 88, in handle_request
    resp = yield from handler(request)
  File "/root/telematrix/telematrix/__init__.py", line 216, in matrix_transaction
    .format(user_id), None)
  File "/root/telematrix/telematrix/__init__.py", line 352, in _matrix_request
    return await response.json()
  File "/root/telematrix/venv/lib/python3.5/site-packages/aiohttp/client_reqrep.py", line 789, in json
    return loads(stripped.decode(encoding))
  File "/root/telematrix/venv/lib/python3.5/encodings/cp1254.py", line 15, in decode
    return codecs.charmap_decode(input,errors,decoding_table)
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 25: character maps to <undefined>

I don't know the message that caused this, just that it doesn't allow the bridge to work.

@14mRh4X0r
Copy link

From what I can see, somehow your homeserver says the response is in Windows-1254 encoding, while responding with (probably) UTF-8. A hotfix would probaby be to replace return await response.json() with return await response.json(encoding='utf-8').

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants