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

IntegrityError: UNIQUE constraint failed: user.sub #493

Closed
cal-itp-sentry bot opened this issue Sep 9, 2024 · 0 comments · Fixed by #494
Closed

IntegrityError: UNIQUE constraint failed: user.sub #493

cal-itp-sentry bot opened this issue Sep 9, 2024 · 0 comments · Fixed by #494
Assignees
Labels
bug Something isn't working

Comments

@cal-itp-sentry
Copy link

cal-itp-sentry bot commented Sep 9, 2024

Sentry Issue: ELIGIBILITY-SERVER-J

IntegrityError: UNIQUE constraint failed: user.sub
  File "sqlalchemy/engine/base.py", line 1967, in _exec_single_context
    self.dialect.do_execute(
  File "sqlalchemy/engine/default.py", line 924, in do_execute
    cursor.execute(statement, parameters)

IntegrityError: (sqlite3.IntegrityError) UNIQUE constraint failed: user.sub
[SQL: INSERT INTO user (sub, name) VALUES (?, ?)]
[parameters: ('85508c45876a957ac931508225e295c0a64bc378fefd4e534e63919493c38eae1dd60a61fff26cd433f1b9824010c389a3ecf7fd55ae0fc7e5f49d90e46a0ab4', 'f82a939a7d17f31ae4294af7f6d8a938f9255e639524f7f97a060a574e017c2c83cf038c483ac7ba7ba65e9c0e262f2ba74f5c6d8682705b673786e4ce5d7183')]
(Background on this error at: https://sqlalche.me/e/20/gkpj)
(29 additional frame(s) were not displayed)
...
  File "eligibility_server/db/setup.py", line 54, in import_users
    import_csv_users(path, remote)
  File "eligibility_server/db/setup.py", line 88, in import_csv_users
    save_user(row["sub"], row["name"], types)
  File "eligibility_server/db/setup.py", line 113, in save_user
    db.session.commit()
  File "<string>", line 2, in commit
    # Copyright (C) 2005-2024 the SQLAlchemy authors and contributors
  File "<string>", line 2, in _prepare_impl
    # Copyright (C) 2005-2024 the SQLAlchemy authors and contributors
@thekaveman thekaveman added the bug Something isn't working label Sep 9, 2024
@thekaveman thekaveman moved this from Todo to In progress in Digital Services Sep 9, 2024
@thekaveman thekaveman moved this from In progress to In review in Digital Services Sep 10, 2024
@github-project-automation github-project-automation bot moved this from In review to Done in Digital Services Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant