-
-
Notifications
You must be signed in to change notification settings - Fork 813
Closed
Labels
Description
It turns out if you load this CSV using csvs-to-sqlite you get an Infinity value in SQLite:
name,num
sasha,10
terry,Inf
cathy,0.5
csvs-to-sqlite infinity-bug.csv infinity-bug.db
I deployed this using:
datasette publish now infinity-bug.db --name=datasette-infinity-bug --install=datasette-vega
Datasette outputs that as Infinity in the JSON format, which causes JavaScript errors.
Demo
- https://datasette-infinity-bug.now.sh/infinity-bug-0d0224e/infinity-bug - HTML view works
- https://datasette-infinity-bug.now.sh/infinity-bug-0d0224e/infinity-bug.json?_shape=array - this outputs the following:
[
{
"rowid": 1,
"name": "sasha",
"num": 10.0
},
{
"rowid": 2,
"name": "terry",
"num": Infinity
},
{
"rowid": 3,
"name": "cathy",
"num": 0.5
}
]
But... in Firefox that gets rendered like this:
And if you click the "Show charting options" button you get this error in the console:
SyntaxError: JSON.parse: unexpected character at line 1 column 83 of the JSON data
Reactions are currently unavailable
