-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
KeyError / status 500 for table with references #79
Comments
Thanks for the SQL file. I could replicate this bug locally like so: wget https://github.com/simonw/datasette-graphql/files/7360568/EinheitenSolar.sql.txt
sqlite3 einheit.db < EinheitenSolar.sql.txt
datasette einheit.db |
OK, I see what is happening here. There's only one table in that file, but it's I'm a little surprised that Datasette doesn't throw errors there to be honest - good that it doesn't! I think I can fix this in the datasette-graphql/datasette_graphql/utils.py Lines 653 to 680 in 0b107eb
|
Error message
Full stack trace: traceback.txt
SQL schema
This happens when I try to open the page of a table "EinheitenSolar". It relates to the table "Katalogwerte" (mentioned in the traceback) in that the "EinheitenSolar" table contains columns which reference "Katalogwerte":
Note that without the GraphQL plugin, Datasette recognises the
references
declarations and displays thelabel_column
as expected. So the tables themselves seem to have a structure that Datasette can generally work with, it's just this plugin that is unhappy.Full SQL for "EinheitenSolar": EinheitenSolar.sql.txt
Screenshot
Versions
The text was updated successfully, but these errors were encountered: