Uploaded image for project: 'ListenBrainz'
  1. ListenBrainz
  2. LB-558

Fix the sentry unicode error

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Normal Normal
    • None
    • None
    • None

      https://sentry.metabrainz.org/metabrainz/listenbrainz/issues/94967/?query=is%3Aunresolved

      We're trying to insert \u0000 into JSONB columns which leads to errors, we should replace the \u0000 with ''

      Error while inserting payload: (psycopg2.errors.UntranslatableCharacter) unsupported Unicode escape sequence
      LINE 2:                          VALUES ('{"artist":"Korn","release"...
                                               ^
      DETAIL:  \u0000 cannot be converted to text.
      CONTEXT:  JSON data, line 1: {"artist":"Korn","release":"Life Is Peachy","title":...[SQL: INSERT INTO recording_json (data, data_sha256, meta_sha256)
                               VALUES (%(data)s, %(data_sha256)s, %(meta_sha256)s)
                            RETURNING id]
      [parameters: {'data': '{"artist":"Korn","release":"Life Is Peachy","title":"K@#\\u00f8\\ufffd\\u0000"}', 'data_sha256': 'cecb21b6f7f5a1f047d53b0c5d2393b3ab9b05cb7cc58ca7c9640748020394f2', 'meta_sha256': '4cf08997d709dec21157730e683a4a1c2591664ede56b976d5153fa91d1712bf'}]
      (Background on this error at: http://sqlalche.me/e/9h9h)
      

            Unassigned Unassigned
            iliekcomputers Param Singh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package