Skip to content

UnicodeEncodeError when replaying a request #329

Closed

Description

@acdha

replay_event (sentry/web/frontend/events.py) can produce an UnicodeEncodeError when asked to encode invalid data from the original request.

It comes down to the point where urlencode calls v = quote_plus(str(v)) (in my case v =u'Especial:Mudan\ufffd_recentes') on a Unicode string. For pysolr I contributed a bit of code which ensures that all of the values have been encoded as UTF-8 so urlencode sees only byte strings:

https://github.com/toastdriven/pysolr/blob/master/pysolr.py#L236-258

Activity

  1. locked and limited conversation to collaborators on Dec 19, 2020
  2. added a commit that references this issue on Dec 9, 2025
    bc23448
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions