We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
~ % gsutil cat gs://ossf-criticality-score/python_top_200.csv | sqlite-utils insert /tmp/crit.db crit - ... File "/usr/local/Cellar/python@3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/Cellar/python@3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
A nicer error message here would be one that says the JSON is invalid but suggests that maybe you could try --csv.
--csv
The text was updated successfully, but these errors were encountered:
% sqlite-utils insert blah.db blah global_power_plant_database.csv Error: Invalid JSON - use --csv for CSV or --tsv for TSV files
Sorry, something went wrong.
1e38a16
Release 3.2
4cc82fd
Refs #206, #211, #212, #213, #214, #215, #216, #217, #218, #219
@simonw Hey! JSON parsing for me is failing and I'm getting this same error, but I feel that my json is correct. How can I debug this?
What's the error message?
Sometimes I pipe JSON through jq to check if it's valid:
jq
cat my.json | jq
@simonw That was working fine. It turned out that I had to use --nl flag since I was passing in jsonl.
--nl
No branches or pull requests
A nicer error message here would be one that says the JSON is invalid but suggests that maybe you could try
--csv
.The text was updated successfully, but these errors were encountered: