Skip to content
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

Application error with --setting flags that accept boolean values #39

Open
theAJFM opened this issue Apr 11, 2021 · 0 comments
Open

Application error with --setting flags that accept boolean values #39

theAJFM opened this issue Apr 11, 2021 · 0 comments

Comments

@theAJFM
Copy link

theAJFM commented Apr 11, 2021

Hi,
I ran into 500 errors when visiting the pages of my vercel deployment, and it only happened every time I deploy the app with --setting flags that accept boolean in it (e.g. allow_download, allow_facet).

Here's the command that I used to deploy my app:

datasette publish vercel database.db --project=blah-blah --install=datasette-vega --setting allow_download off

And here's the error that I observed in vercel's logs:

module initialization error: name 'false' is not defined
module initialization error
name 'false' is not defined

If I may take an educated guess, the error is caused by the use of json.dumps on the settings dictionary here.

I can confirm that the generated source code in the vercel has the lowercase false boolean set as the value of the dictionary. It was neither a "false" string nor python's False boolean, whichever it is you meant to set.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant