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

Key (user_id, service)=(<uid>, spotify) already exists

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • None
    • None
    • None

      After spotify blocked my account (enforcement of password reset) due to "suspicious login activity" I received a mail from listenbrainz telling me, that the connection to spotify was interrupted.

      I tried to re-establish the connection after my spotify account was recovered - but the workflow to connect spotify ended with following error message:

       

      internal server error

       

      {{(psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "user_id_service_ndx_listens_importer"
      DETAIL: Key (user_id, service)=(5709, spotify) already exists.

      [SQL:
      INSERT INTO listens_importer
      (external_service_oauth_id, user_id, service)
      VALUES
      (%(external_service_oauth_id)s, %(user_id)s, %(service)s)
      ]
      [parameters: \{'external_service_oauth_id': 12111, 'user_id': 5709, 'service': 'spotify'}]
      (Background on this error at: http://sqlalche.me/e/13/gkpj)}}

       

       

            kartik1712 amCap1712
            listen001 listen001
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package