Peewee error?
See original GitHub issueHello, I’m getting the following issue when trying to download via SQLite on Windows. I’m still able to run SQLite, do SQL queries, and all that, so it must not be affecting functionality too much. I assume maybe I’d created the team.team_id database entries previously and it was just clashing because it had to overwrite it? I’m relatively new to all this so it could be some dependency I don’t have or something to do with my system.
Traceback (most recent call last):
File "peewee.py", line 3144, in execute_sql
sqlite3.IntegrityError: UNIQUE constraint failed: team.team_id
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "nba_sql.py", line 394, in <module>
File "gooey\python_bindings\gooey_decorator.py", line 134, in <lambda>
File "nba_sql.py", line 218, in main
File "nba_sql.py", line 343, in populate_base_tables
File "general_requester.py", line 51, in populate
File "db_utils.py", line 15, in insert_many
File "db_utils.py", line 28, in __insert_many_sqlite
File "peewee.py", line 1907, in inner
File "peewee.py", line 1978, in execute
File "peewee.py", line 2745, in _execute
File "peewee.py", line 2474, in _execute
File "peewee.py", line 3157, in execute
File "peewee.py", line 3151, in execute_sql
File "peewee.py", line 2917, in __exit__
File "peewee.py", line 190, in reraise
File "peewee.py", line 3144, in execute_sql
peewee.IntegrityError: UNIQUE constraint failed: team.team_id
Thanks in advance!
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (10 by maintainers)
Top Results From Across the Web
Peewee - Database Errors - Tutorialspoint
Peewee - Database Errors, Python’s DB-API standard (recommended by PEP 249) specifies the types of Exception classes to be defined by any DB-API...
Read more >Database — peewee 3.15.4 documentation
Peewee comes with support for SQLite, MySQL and Postgres. ... This particular error can occur when MySQL kills an idle database connection.
Read more >Failing to install Peewee with Pip · Issue #1676 - GitHub
Hi, currently I am having a lot of trouble installing Peewee. ... peewee Running setup.py bdist_wheel for peewee ... error Complete output ...
Read more >peewee error on newly created save() - Stack Overflow
You need to use save(force_insert=True) when using a non-auto-incrementing primary key.
Read more >peewee.InterfaceError: Error binding parameter 0 - Treehouse
peewee.InterfaceError: Error binding parameter 0 - probably unsupported type. To be honest I don't even know what that error means hah!
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sorry for the delay on this. I re-built the windows client and give it a run through locally. Looks good.
That shot_chart_detail issue was also not real. I just didn’t refresh my dbeaver connection when I rebuilt the database. It looks good, too.
You can find the release here: https://github.com/mpope9/nba-sql/releases/tag/v0.0.6 thanks for reporting this!
Ok this should be fixed on master I believe. I can cut another windows build tomorrow, but you can also create your own using this script: https://github.com/mpope9/nba-sql/blob/master/scripts/build_exe.txt
However when doing some testing I noticed that shot_chart_detail is not populated correctly on sqlite, it only works on postgres and mysql. I’ve filed this follow up for it: https://github.com/mpope9/nba-sql/issues/61
I’ll close this issue once I take it out for a spin tomorrow night.