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

UnicodeDecodeError traceback on URL preview #4585

Open
matrixbot opened this issue Dec 16, 2023 · 0 comments
Open

UnicodeDecodeError traceback on URL preview #4585

matrixbot opened this issue Dec 16, 2023 · 0 comments

Comments

@matrixbot
Copy link
Collaborator

matrixbot commented Dec 16, 2023

This issue has been migrated from #4585.


Description

UnicodeDecodeError

Steps to reproduce

synapse.http.server - 112 - ERROR - GET-132- Failed handle request via <function PreviewUrlResource._async_render_GET at 0x7fd5271cd2f0>: <XForwardedForRequest at 0x7fd525a65da0 method='GET' uri='/_matrix/media/r0/preview_url?url=http%3A%2F%2Fwww.sirkusaikamoinen.com%2Ffutureperformances%2Fnomad-i-mariagrdens-kyrkosal-i-borg%E2%80%8B&ts=1539766933898' clientproto='HTTP/1.1' site=8008>: Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/usr/local/lib/python3.6/site-packages/synapse/http/server.py", line 81, in wrapped_request_handler
    yield h(self, request)
  File "/usr/local/lib/python3.6/site-packages/twisted/internet/defer.py", line 1613, in unwindGenerator
    return _cancellableInlineCallbacks(gen)
  File "/usr/local/lib/python3.6/site-packages/twisted/internet/defer.py", line 1529, in _cancellableInlineCallbacks
    _inlineCallbacks(None, g, status)
--- <exception caught here> ---
  File "/usr/local/lib/python3.6/site-packages/synapse/http/server.py", line 81, in wrapped_request_handler
    yield h(self, request)
  File "/usr/local/lib/python3.6/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/usr/local/lib/python3.6/site-packages/synapse/rest/media/v1/preview_url_resource.py", line 110, in _async_render_GET
    url = parse_string(request, "url")
  File "/usr/local/lib/python3.6/site-packages/synapse/http/servlet.py", line 144, in parse_string
    request.args, name, default, required, allowed_values, param_type, encoding
  File "/usr/local/lib/python3.6/site-packages/synapse/http/servlet.py", line 158, in parse_string_from_args
    value = value.decode(encoding)
builtins.UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 86: ordinal not in range(128)
synapse.http.server - 112 - ERROR - GET-134- Failed handle request via <function PreviewUrlResource._async_render_GET at 0x7fd5271cd2f0>: <XForwardedForRequest at 0x7fd525e9a748 method='GET' uri='/_matrix/media/r0/preview_url?url=http%3A%2F%2Fwww.haaganpuro.fi%2Fajankohtaista%2Fr-i-p-pirkko%2F%E2%80%8B&ts=1539852446322' clientproto='HTTP/1.1' site=8008>: Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/usr/local/lib/python3.6/site-packages/synapse/http/server.py", line 81, in wrapped_request_handler
    yield h(self, request)
  File "/usr/local/lib/python3.6/site-packages/twisted/internet/defer.py", line 1613, in unwindGenerator
    return _cancellableInlineCallbacks(gen)
  File "/usr/local/lib/python3.6/site-packages/twisted/internet/defer.py", line 1529, in _cancellableInlineCallbacks
    _inlineCallbacks(None, g, status)
--- <exception caught here> ---
  File "/usr/local/lib/python3.6/site-packages/synapse/http/server.py", line 81, in wrapped_request_handler
    yield h(self, request)
  File "/usr/local/lib/python3.6/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/usr/local/lib/python3.6/site-packages/synapse/rest/media/v1/preview_url_resource.py", line 110, in _async_render_GET
    url = parse_string(request, "url")
  File "/usr/local/lib/python3.6/site-packages/synapse/http/servlet.py", line 144, in parse_string
    request.args, name, default, required, allowed_values, param_type, encoding
  File "/usr/local/lib/python3.6/site-packages/synapse/http/servlet.py", line 158, in parse_string_from_args
    value = value.decode(encoding)
builtins.UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 52: ordinal not in range(128)

Version information

  • Version: 0.99.0
  • Install method: docker
  • Platform: Linux
@matrixbot matrixbot changed the title Dummy issue UnicodeDecodeError traceback on URL preview Dec 21, 2023
@matrixbot matrixbot reopened this Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant