csvs-to-sqlite
csvs-to-sqlite copied to clipboard
error_bad_lines argument has been deprecated
I get a deprecation warning on the latest stable.
csvs_to_sqlite/utils.py:38: FutureWarning: The error_bad_lines argument has been deprecated and will be removed in a future version. Use on_bad_lines in the future.
Hi, This is giving an error now:
Could not load file.csv: read_csv() got an unexpected keyword argument 'error_bad_lines'
It would be great if it can be updated.
From the pandas release notes for the latest version (April, 3 2023)
Removed arguments prefix, squeeze, error_bad_lines and warn_bad_lines from read_csv() (GH40413, GH43427)
https://pandas.pydata.org/docs/whatsnew/v2.0.0.html#removal-of-prior-version-deprecations-changes
Seeing this error in 1.3 now. A workaround is to temporarily roll back pandas: pip install 'pandas==1.4.0'
Also having this issue. Crazy that it's almost a year now! Maybe nobody is using csvs-to-sqlite
?
Yep, that did it.
this worked for me too!
pip3 install 'pandas==1.4.0'
# git clone from this repo and cd to that directory
pip3 install -e .
Also having this issue. Crazy that it's almost a year now! Maybe nobody is using
csvs-to-sqlite
?
Asked myself the same, but the tool has hundreds of downloads each WEEK! Looks like lots of people try it out and then give up as it doesnt work out of the box.
@panique Or we're just using it every day and don't see a need to mention it. It's just another tool in the toolbox, like awk
or vi
.
If you've been using it all along and you haven't updated pandas, you won't see the issue -- this is a problem that occurs if you do a fresh install.
I'm working around it by just using sqlite-utils:
sqlite-utils insert reviews.db reviews reviews.csv --csv
is functionally identical to:
csvs-to-sqlite reviews.csv reviews.db
https://github.com/simonw/csvs-to-sqlite/issues/69 seems relevant here.