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

dvc list --rev: fails on local repo #5865

Closed
dberenbaum opened this issue Apr 22, 2021 · 2 comments · Fixed by #6121
Closed

dvc list --rev: fails on local repo #5865

dberenbaum opened this issue Apr 22, 2021 · 2 comments · Fixed by #6121
Assignees
Labels
bug Did we break something? p1-important Important, aka current backlog of things to do product: VSCode Integration with VSCode extension

Comments

@dberenbaum
Copy link
Collaborator

Bug Report

Description

When doing dvc list . . --rev HEAD or similar commands with --rev on a local repo, command fails.

Reproduce

  1. Start in an existing dvc repo
  2. Run dvc list -v . . --rev HEAD

Output:

2021-04-22 16:54:41,169 ERROR: unexpected error
------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/dave/Code/dvc/dvc/main.py", line 55, in main
    ret = cmd.run()
  File "/Users/dave/Code/dvc/dvc/command/ls/__init__.py", line 30, in run
    entries = Repo.ls(
  File "/Users/dave/Code/dvc/dvc/repo/ls.py", line 33, in ls
    with Repo.open(url, rev, subrepos=True, uninitialized=True) as repo:
  File "/Users/dave/miniconda3/envs/example-get-started/lib/python3.8/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/Users/dave/Code/dvc/dvc/repo/__init__.py", line 219, in open
    yield Repo(url, *args, **kwargs)
  File "/Users/dave/Code/dvc/dvc/repo/__init__.py", line 156, in __init__
    self.root_dir, self.dvc_dir, self.tmp_dir = self._get_repo_dirs(
  File "/Users/dave/Code/dvc/dvc/repo/__init__.py", line 92, in _get_repo_dirs
    assert bool(scm) == bool(rev)
AssertionError
------------------------------------------------------------
2021-04-22 16:54:42,272 DEBUG: Version info for developers:
DVC version: 2.0.18+17d7b0
---------------------------------
Platform: Python 3.8.5 on macOS-10.16-x86_64-i386-64bit
Supports: azure, gdrive, hdfs, webhdfs, http, https, s3, ssh, oss, webdav, webdavs
Cache types: reflink, hardlink, symlink
Cache directory: apfs on /dev/disk3s1s1
Caches: local
Remotes: https, s3, local
Workspace directory: apfs on /dev/disk3s1s1
Repo: dvc, git

Having any troubles? Hit us up at https://dvc.org/support, we are always happy to help!
2021-04-22 16:54:42,273 DEBUG: Analytics is enabled.
2021-04-22 16:54:42,367 DEBUG: Trying to spawn '['daemon', '-q', 'analytics', '/var/folders/24/99_tf1xj3vx8k1k_jkdmnhq00000gn/T/tmpu3h0uu25']'
2021-04-22 16:54:42,372 DEBUG: Spawned '['daemon', '-q', 'analytics', '/var/folders/24/99_tf1xj3vx8k1k_jkdmnhq00000gn/T/tmpu3h0uu25']'

Expected

Under discussion 🤣

Environment information

Output of dvc doctor:

$ dvc doctor
DVC version: 2.0.18+17d7b0
---------------------------------
Platform: Python 3.8.5 on macOS-10.16-x86_64-i386-64bit
Supports: azure, gdrive, hdfs, webhdfs, http, https, s3, ssh, oss, webdav, webdavs
Cache types: reflink, hardlink, symlink
Cache directory: apfs on /dev/disk3s1s1
Caches: local
Remotes: https, s3, local
Workspace directory: apfs on /dev/disk3s1s1
Repo: dvc, git
@dberenbaum dberenbaum added the bug Did we break something? label Apr 22, 2021
@mattseddon
Copy link
Member

Good thing I checked because I just ran into the exact same problem (probably even doing the same test).

@dberenbaum dberenbaum added the product: VSCode Integration with VSCode extension label May 3, 2021
@skshetry
Copy link
Member

Note that this was supposed to be fixed by #5822, but looks like it's not (@dberenbaum's commit is ahead of 853d304).

@dberenbaum dberenbaum added the p1-important Important, aka current backlog of things to do label May 18, 2021
@dberenbaum dberenbaum self-assigned this May 24, 2021
@efiop efiop self-assigned this May 25, 2021
efiop added a commit to efiop/dvc that referenced this issue Jun 6, 2021
@efiop efiop mentioned this issue Jun 6, 2021
2 tasks
efiop added a commit that referenced this issue Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Did we break something? p1-important Important, aka current backlog of things to do product: VSCode Integration with VSCode extension
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants