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

Show more information when JSON can't be imported with sqlite-utils insert #532

Closed
voltagex opened this issue Mar 12, 2023 · 2 comments
Closed
Labels
enhancement New feature or request

Comments

@voltagex
Copy link

voltagex commented Mar 12, 2023

I am currently trying to import the JSON export of my data from Discord, specifically activity/reporting/events-*.json

sqlite-utils.exe insert test.db reporting events-2023-00000-of-00001.json
  [###################################-]   99%  00:00:00
Error: Invalid JSON - use --csv for CSV or --tsv for TSV files

Please show more information as to why this is invalid, if possible.

I am using version 3.30 with Python 3.10 on Windows 11.

@simonw
Copy link
Owner

simonw commented May 8, 2023

Was this a newline-delimited JSON file perhaps?

@simonw
Copy link
Owner

simonw commented May 8, 2023

Here's an improvement:

% sqlite-utils insert /tmp/b.db blah /tmp/blah.txt
  [####################################]  100%
Error: Invalid JSON - use --csv for CSV or --tsv for TSV files

JSON error: Expecting value: line 1 column 1 (char 0)

@simonw simonw closed this as completed in e4ed372 May 8, 2023
@simonw simonw added the enhancement New feature or request label May 8, 2023
simonw added a commit that referenced this issue May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants