-
-
Notifications
You must be signed in to change notification settings - Fork 694
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
Confusing error if metadata.json contains nested data #2403
Labels
Comments
That's happening here: Lines 737 to 746 in 1f3fb5f
Two options:
I'm tempted by option 2 - I think it will be easier and supporting nested JSON in metadata feels like it could be useful. |
With that fix in place, the above example can do this: datasette -m bad.json --get '/.json' | jq {
"databases": {
"_memory": {
"name": "_memory",
"hash": null,
"color": "a6c7b9",
"path": "/_memory",
"tables_and_views_truncated": [],
"tables_and_views_more": false,
"tables_count": 0,
"table_rows_sum": 0,
"show_table_row_counts": false,
"hidden_table_rows_sum": 0,
"hidden_tables_count": 0,
"views_count": 0,
"private": false
}
},
"metadata": {
"settings": "{\"trace_debug\": 1}"
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Create an invalid
metadata.json
file like this:And start Datasette like so:
Datasette appears to start correctly, but when you attempt to load any page you get this error:
I ran
datasette -m metadata.json --get / --pdb
and found that the problem was here:The text was updated successfully, but these errors were encountered: