-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
dvc add no longer working #10692
Comments
Having the same error message while pulling. So far this happens on Windows. My environment is shown below:
|
I've upgraded to the latest version (3.59.1), still getting the error when I try to do a dvc add. DVC version: 3.59.1 (conda)Platform: Python 3.12.7 on Linux-6.8.0-52-generic-x86_64-with-glibc2.35 |
Can you please try with |
Instead of conda try it with virtualenv |
Hi, I ran into the same problem today and found that it's related to libsqlite version 3.49.1. In my case, running:
fixed the issue. Hope this helps! |
@nobutoba Thanks. It seems to resolve the issue. Looks like there is a bug or an incompatibility in the recent version of libsqlite. |
@skshetry: Thanks for jumping in. I looked at this in more detail last night. the crash happened in site-packages/dvc_data/hashfile/cache.py". The program was trying to do an insert into cache db and complained the column 'size' did not exist. The print for the added file looks as follows: ('/test/data/test.txt', '{"version":1,"checksum":"321037014704241475440851141032219623992","size":5,"hash_info":{"md5":"6137cde4893c59f76f005a8123d8e8e6"}}')]. @nobutoba : Thanks, you are a life saver! |
It doesn't make sense to me to close this issue until the problem is fixed, either in DVC or SQLite — downgrading SQLite works around the problem, but there is still a bug when combining DVC with the most recent version of SQLite, which is a configuration that happens in Conda and I expect would also appear in rolling-release Linux distributions like Arch. |
@mdekstrand, I have reopened the issue. If you are experiencing this problem, please provide a verbose traceback so that I can identify where this is happening. If you are installing DVC from any other places than PyPI, I suggest you try installing with There is also a related bug report: iterative/dvc-data#599, but so far I haven't been able to reproduce with As another step, try deleting |
Here's a traceback. This was in CI, so cache was completely clean (except for the local file cache, cached in GHA). Switching to Traceback
|
Ok, I finally found the root cause: conda-forge/sqlite-feedstock#130, which is a regression in a recent release of sqlite installed from conda. cc @sfinkens. |
Is DVC or one of its dependencies using a double-quoted string literal when it should use a single-quoted one for SQL conformity? |
yes, |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@jothsnapraveena (and, anyone else encountering this issue), please check if you are using Python/sqlite from conda. You can either rollback to an older version of sqlite as mentioned in #10692 (comment), or use a different Python installation (eg: from We'll keep this issue open until either conda-forge/sqlite-feedstock#130 or grantjenks/python-diskcache#311 gets resolved. Please read the discussion above, and avoid commenting unless the above suggested solutions do not work, or you find any new information. |
Bug Report
Issue name
dvc add causes an unexpected error:
Description
I've had DVC running on a Linux server for the past 3 months. Yesterday I set up a new conda environment with DVC 3.59.1 and now when I add data with "dvc add xxx" I get the following error:
"Adding... ERROR: unexpected error - no such column: "size" - should this be a string literal in single-quotes?".
Let me add that I have tried to reset DVC ("dvc init") and I have also deleted the .dvc directory and started from scratch, but the error persists. Maybe I made a mistake deleting the .dvc directory. Is there something else I need to do for a complete dvc reset?
Reproduce
Expected
Dvc adds file and does not show an error.
Environment information
Ubuntu 20.04
DVC 3.57.0
Output of
dvc doctor
:$ dvc doctor
DVC version: 3.57.0 (conda)
Platform: Python 3.9.21 on Linux-6.8.0-52-generic-x86_64-with-glibc2.35
Subprojects:
dvc_data = 3.16.9
dvc_objects = 5.1.0
dvc_render = 1.0.2
dvc_task = 0.40.2
scmrepo = 3.3.10
Supports:
http (aiohttp = 3.11.12, aiohttp-retry = 2.8.3),
https (aiohttp = 3.11.12, aiohttp-retry = 2.8.3)
Config:
Global: /home/uli/.config/dvc
System: /etc/xdg/dvc
Cache types: https://error.dvc.org/no-dvc-cache
Caches: local
Remotes: None
Workspace directory: ext4 on /dev/nvme0n1
Repo: dvc, git
Repo.site_cache_dir: /var/tmp/dvc/repo/1efc5571a372d9b6285ce7e59990bbae
The text was updated successfully, but these errors were encountered: