Closed rogersheu closed 2 years ago
Hi! It sounds like you created the database already and are trying to re-run the app on the existing database. Is that correct?
The app isn't very sophisticated when it comes to updating a database. Maybe this is a good place to start.
It looks like we're using db_utils.insert_many
for the team
table. Maybe it'd make more sense to call db_utils.insert_many_ignore_on_conflict
.
I can try to make this change tonight or tomorrow, unless you would like to take a crack at it?
Also, are you using the windows client in the release or did you build your own?
Hi! It sounds like you created the database already and are trying to re-run the app on the existing database. Is that correct?
Most likely. The first time I ran it, I think I ran into a completely different error, but I remember resolving it (and I do not recall what caused it). So any/every subsequent attempt likely threw this error.
It looks like we're using db_utils.insert_many for the team table. Maybe it'd make more sense to call db_utils.insert_many_ignore_on_conflict.
Does it make sense to do this on_conflict_ignore call everywhere where relevant? Or maybe it should throw some warning/clarification (or error/exception) message?
Also, are you using the windows client in the release or did you build your own?
I used your 0.0.4 alpha release Windows client.
Also, nice seeing you outside the confines of the NBA (and UtahJazz) subreddit! Cool application you've provided here.
OK, I am sitting on a PR that I forgot to merge. It should make this easier going forward. It includes a --skip-tables
option that takes the team
table as an option. I'll see if I can clean that up and merge it tonight and cut a new windows release. I will tag you in a comment here when its done and we can see if it solves the issue.
I'd like to limit on_conflict_ignore
to base tables like team
, as I feel like it could cause data issues but I'm not 100% certain. I think merging the expanded --skip-tables
option is better overall.
And thank you!
PR here for reference: https://github.com/mpope9/nba-sql/pull/59
Sounds good!
Small side question @mpope9 . Can data from 2021-22 be pulled for this database? In the .exe dialog box, it went up to 2020-21, but if I wanted to do a 2020-21 vs. 2021-22 comparison, could I go about doing that?
Thanks!
Since I'm making the PR I'll just toss that in because it is a one line change.
@rogersheu Wanna give this release a try: https://github.com/mpope9/nba-sql/releases/tag/v0.0.5 You can select multiple tables to skip the regular way by holding shift. I don't use the GUI much so let me know if there are any issues.
Tried running it on both 2021-22 and 2020-21 (separately) and got the same error.
Traceback (most recent call last):
File "nba_sql.py", line 378, in <module>
File "gooey\python_bindings\gooey_decorator.py", line 134, in <lambda>
File "nba_sql.py", line 89, in main
AttributeError: 'Namespace' object has no attribute 'batch_size'
Also would like to mention that in the description for seasons
selection, you have the following example usage
--seasons 2019-2020 2020-2021
but it should (probably) be --seasons 2019-20 2020-21
ah, I only tested with the commadline version. I'll see what the issue that I caused is. In the meantime, the previous release has --skip-base-tables
which should do the trick as well.
I ran into the same issue running it from command line. The old version worked both ways.
Maybe it's something on my system's end?
I was able to repro it with the GUI version. I'll see what I can do.
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.
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!
Cool! Thanks for maintaining!
Thank you for using đŸ˜„
Hello, 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.
Thanks in advance!