simonw / datasette-graphql

Datasette plugin providing an automatic GraphQL API for your SQLite databases
https://datasette-graphql-demo.datasette.io/
Apache License 2.0
101 stars 6 forks source link

500 error on a table called _csv_progress #89

Closed simonw closed 2 years ago

simonw commented 2 years ago

Got this on /data/_csv_progress running https://datasette.io/plugins/datasette-upload-csvs

image

simonw commented 2 years ago

From the logs:

[info] {% set links = table_actions() %}{% if links %
[info] File "/usr/local/lib/python3.9/site-packages/jinja2/async_utils.py", line 56, in auto_awai
[info] return await t.cast("t.Awaitable[V]", value
[info] File "/usr/local/lib/python3.9/site-packages/datasette/views/table.py", line 847, in table_action
[info] extra_links = await await_me_maybe(hook
[info] File "/usr/local/lib/python3.9/site-packages/datasette/utils/__init__.py", line 111, in await_me_mayb
[info] value = await valu
[info] File "/usr/local/lib/python3.9/site-packages/datasette_graphql/__init__.py", line 212, in inne
[info] example_query = await db_schema.table_classes[table].example_query(
[info] KeyError: '_csv_progress_
simonw commented 2 years ago

Relevant code: https://github.com/simonw/datasette-graphql/blob/22cf6a04d4d11564317f0165d03e1d4b84f1b822/datasette_graphql/__init__.py#L207-L222

simonw commented 2 years ago

This is weird: the test passes, and in my development environment I can't replicate this issue.