-
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
unexpected error - b'worktreeConfig' #10395
Comments
I can reproduce this. Full stack trace: Traceback (most recent call last):
File "/Users/ivan/Projects/dvc/dvc/cli/__init__.py", line 210, in main
cmd = args.func(args)
File "/Users/ivan/Projects/dvc/dvc/cli/command.py", line 21, in __init__
self.repo: "Repo" = Repo(uninitialized=self.UNINITIALIZED)
File "/Users/ivan/Projects/dvc/dvc/repo/__init__.py", line 218, in __init__
self._ignore()
File "/Users/ivan/Projects/dvc/dvc/repo/__init__.py", line 457, in _ignore
self.scm_context.ignore(file)
File "/Users/ivan/Projects/dvc/.venv/lib/python3.9/site-packages/funcy/objects.py", line 25, in __get__
res = instance.__dict__[self.fget.__name__] = self.fget(instance)
File "/Users/ivan/Projects/dvc/dvc/repo/__init__.py", line 320, in scm_context
return SCMContext(self.scm, self.config)
File "/Users/ivan/Projects/dvc/.venv/lib/python3.9/site-packages/funcy/objects.py", line 25, in __get__
res = instance.__dict__[self.fget.__name__] = self.fget(instance)
File "/Users/ivan/Projects/dvc/dvc/repo/__init__.py", line 308, in scm
return SCM(self.root_dir, no_scm=no_scm)
File "/Users/ivan/Projects/dvc/dvc/scm.py", line 111, in SCM
return Git(root_dir, search_parent_directories=search_parent_directories)
File "/Users/ivan/Projects/dvc/.venv/lib/python3.9/site-packages/scmrepo/git/__init__.py", line 106, in __init__
first_ = first(self.backends.values())
File "/Users/ivan/Projects/dvc/.venv/lib/python3.9/site-packages/funcy/seqs.py", line 63, in first
return next(iter(seq), None)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/_collections_abc.py", line 871, in __iter__
yield self._mapping[key]
File "/Users/ivan/Projects/dvc/.venv/lib/python3.9/site-packages/scmrepo/git/__init__.py", line 63, in __getitem__
initialized = backend(*self.args, **self.kwargs)
File "/Users/ivan/Projects/dvc/.venv/lib/python3.9/site-packages/scmrepo/git/backend/dulwich/__init__.py", line 191, in __init__
self.repo = Repo.discover(start=root_dir)
File "/Users/ivan/Projects/dvc/.venv/lib/python3.9/site-packages/dulwich/repo.py", line 1263, in discover
return cls(path)
File "/Users/ivan/Projects/dvc/.venv/lib/python3.9/site-packages/dulwich/repo.py", line 1195, in __init__
raise UnsupportedExtension(extension)
dulwich.repo.UnsupportedExtension: b'worktreeConfig'
Traceback (most recent call last):
File "/Users/ivan/Projects/dvc/dvc/cli/__init__.py", line 210, in main
cmd = args.func(args)
File "/Users/ivan/Projects/dvc/dvc/cli/command.py", line 21, in __init__
self.repo: "Repo" = Repo(uninitialized=self.UNINITIALIZED)
File "/Users/ivan/Projects/dvc/dvc/repo/__init__.py", line 218, in __init__
self._ignore()
File "/Users/ivan/Projects/dvc/dvc/repo/__init__.py", line 457, in _ignore
self.scm_context.ignore(file)
File "/Users/ivan/Projects/dvc/.venv/lib/python3.9/site-packages/funcy/objects.py", line 25, in __get__
res = instance.__dict__[self.fget.__name__] = self.fget(instance)
File "/Users/ivan/Projects/dvc/dvc/repo/__init__.py", line 320, in scm_context
return SCMContext(self.scm, self.config)
File "/Users/ivan/Projects/dvc/.venv/lib/python3.9/site-packages/funcy/objects.py", line 25, in __get__
res = instance.__dict__[self.fget.__name__] = self.fget(instance)
File "/Users/ivan/Projects/dvc/dvc/repo/__init__.py", line 308, in scm
return SCM(self.root_dir, no_scm=no_scm)
File "/Users/ivan/Projects/dvc/dvc/scm.py", line 111, in SCM
return Git(root_dir, search_parent_directories=search_parent_directories)
File "/Users/ivan/Projects/dvc/.venv/lib/python3.9/site-packages/scmrepo/git/__init__.py", line 106, in __init__
first_ = first(self.backends.values())
File "/Users/ivan/Projects/dvc/.venv/lib/python3.9/site-packages/funcy/seqs.py", line 63, in first
return next(iter(seq), None)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/_collections_abc.py", line 871, in __iter__
yield self._mapping[key]
File "/Users/ivan/Projects/dvc/.venv/lib/python3.9/site-packages/scmrepo/git/__init__.py", line 63, in __getitem__
initialized = backend(*self.args, **self.kwargs)
File "/Users/ivan/Projects/dvc/.venv/lib/python3.9/site-packages/scmrepo/git/backend/dulwich/__init__.py", line 191, in __init__
self.repo = Repo.discover(start=root_dir)
File "/Users/ivan/Projects/dvc/.venv/lib/python3.9/site-packages/dulwich/repo.py", line 1263, in discover
return cls(path)
File "/Users/ivan/Projects/dvc/.venv/lib/python3.9/site-packages/dulwich/repo.py", line 1195, in __init__
raise UnsupportedExtension(extension)
dulwich.repo.UnsupportedExtension: b'worktreeConfig'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/ivan/Projects/dvc/.venv/bin/dvc", line 8, in <module>
sys.exit(main())
File "/Users/ivan/Projects/dvc/dvc/cli/__init__.py", line 236, in main
ret = _log_exceptions(exc) or 255
File "/Users/ivan/Projects/dvc/dvc/cli/__init__.py", line 147, in _log_exceptions
_log_unknown_exceptions()
File "/Users/ivan/Projects/dvc/dvc/cli/__init__.py", line 49, in _log_unknown_exceptions
logger.debug("Version info for developers:\n%s", get_dvc_info())
File "/Users/ivan/Projects/dvc/dvc/info.py", line 38, in get_dvc_info
with Repo() as repo:
File "/Users/ivan/Projects/dvc/dvc/repo/__init__.py", line 218, in __init__
self._ignore()
File "/Users/ivan/Projects/dvc/dvc/repo/__init__.py", line 457, in _ignore
self.scm_context.ignore(file)
File "/Users/ivan/Projects/dvc/.venv/lib/python3.9/site-packages/funcy/objects.py", line 25, in __get__
res = instance.__dict__[self.fget.__name__] = self.fget(instance)
File "/Users/ivan/Projects/dvc/dvc/repo/__init__.py", line 320, in scm_context
return SCMContext(self.scm, self.config)
File "/Users/ivan/Projects/dvc/.venv/lib/python3.9/site-packages/funcy/objects.py", line 25, in __get__
res = instance.__dict__[self.fget.__name__] = self.fget(instance)
File "/Users/ivan/Projects/dvc/dvc/repo/__init__.py", line 308, in scm
return SCM(self.root_dir, no_scm=no_scm)
File "/Users/ivan/Projects/dvc/dvc/scm.py", line 111, in SCM
return Git(root_dir, search_parent_directories=search_parent_directories)
File "/Users/ivan/Projects/dvc/.venv/lib/python3.9/site-packages/scmrepo/git/__init__.py", line 106, in __init__
first_ = first(self.backends.values())
File "/Users/ivan/Projects/dvc/.venv/lib/python3.9/site-packages/funcy/seqs.py", line 63, in first
return next(iter(seq), None)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/_collections_abc.py", line 871, in __iter__
yield self._mapping[key]
File "/Users/ivan/Projects/dvc/.venv/lib/python3.9/site-packages/scmrepo/git/__init__.py", line 63, in __getitem__
initialized = backend(*self.args, **self.kwargs)
File "/Users/ivan/Projects/dvc/.venv/lib/python3.9/site-packages/scmrepo/git/backend/dulwich/__init__.py", line 191, in __init__
self.repo = Repo.discover(start=root_dir)
File "/Users/ivan/Projects/dvc/.venv/lib/python3.9/site-packages/dulwich/repo.py", line 1263, in discover
return cls(path)
File "/Users/ivan/Projects/dvc/.venv/lib/python3.9/site-packages/dulwich/repo.py", line 1195, in __init__
raise UnsupportedExtension(extension)
dulwich.repo.UnsupportedExtension: b'worktreeConfig' Also, CI is failing with this. Probably related to some libraries update. Not sure, but seems a |
Yes, we also get an error in CI |
@DimaAmega yep, it seems tbh that Github has changed something with the way they setup git on CI. Again, sorry about that. We are looking into this. |
Temporary workaround on CI:
(borrowed from one the linked PRs in the Dulwich issue) |
Related to this iterative/dvc#10395
Added temporary fix to this issue iterative/dvc#10395
* fix(deps): use the latest dulwich Related to this iterative/dvc#10395 * vendor in some test helpers from dulwich
This is fixed upstream. A new fixed version of |
Bug Report
Issue name
pull: unexpected error - b'worktreeConfig'
Description
When attempting to use the
dvc pull
command in a repository with theworktreeConfig
extension enabled in Git, DVC throws an unexpected error. The error message received is "ERROR: unexpected error - b'worktreeConfig'". This issue persists even after attempting to setworktreeConfig
to false via the Git config.Reproduce
git init
.worktreeConfig
in the Git configuration withgit config extensions.worktreeConfig false
.dvc init
.dvc add file
.dvc pull
.Expected
The
dvc pull
command should execute without any errors, syncing the DVC-tracked files from the remote storage. The presence of theworktreeConfig
setting in Git should not impact DVC operations.The text was updated successfully, but these errors were encountered: