Dvc pull - ERROR: failed to collect 'workspace'

I have an existing project I’m trying to setup on a new machine. I’ve cloned the git repo and setup a python environment with the same module library versions as the other machine. However, when I run dvc pull I get a the error ERROR: failed to collect 'workspace' , and I can’t figure out why.

I’ve tried recloning the repo from scratch a second time, with the same result.

Here is the detailed output:

2023-12-06 19:50:32,608 DEBUG: v3.6.0 (pip), CPython 3.10.7 on macOS-13.5-arm64-arm-64bit
2023-12-06 19:50:32,608 DEBUG: command: /Users/kyancey/Documents/GitHub/det-grade/.pyenv2/bin/dvc pull --verbose
2023-12-06 19:50:33,293 ERROR: failed to collect 'workspace'          
Traceback (most recent call last):
  File "/Users/kyancey/Documents/GitHub/det-grade/.pyenv2/lib/python3.10/site-packages/dvc/repo/fetch.py", line 45, in _collect_indexes
    indexes[idx.data_tree.hash_info.value] = idx.data["repo"]
  File "/Users/kyancey/Documents/GitHub/det-grade/.pyenv2/lib/python3.10/site-packages/funcy/objects.py", line 25, in __get__
    res = instance.__dict__[self.fget.__name__] = self.fget(instance)
  File "/Users/kyancey/Documents/GitHub/det-grade/.pyenv2/lib/python3.10/site-packages/dvc/repo/index.py", line 705, in data
    for workspace, data_index in self._index.data.items():
  File "/Users/kyancey/Documents/GitHub/det-grade/.pyenv2/lib/python3.10/site-packages/funcy/objects.py", line 25, in __get__
    res = instance.__dict__[self.fget.__name__] = self.fget(instance)
  File "/Users/kyancey/Documents/GitHub/det-grade/.pyenv2/lib/python3.10/site-packages/dvc/repo/index.py", line 465, in data
    _load_storage_from_out(data_index.storage_map, key, out)
  File "/Users/kyancey/Documents/GitHub/det-grade/.pyenv2/lib/python3.10/site-packages/dvc/repo/index.py", line 163, in _load_storage_from_out
    storage_map.add_cache(ObjectStorage(key, out.cache))
  File "/Users/kyancey/Documents/GitHub/det-grade/.pyenv2/lib/python3.10/site-packages/dvc/output.py", line 527, in cache
    assert self.is_in_repo
AssertionError

2023-12-06 19:50:33,294 ERROR: unexpected error
Traceback (most recent call last):
  File "/Users/kyancey/Documents/GitHub/det-grade/.pyenv2/lib/python3.10/site-packages/dvc/cli/__init__.py", line 209, in main
    ret = cmd.do_run()
  File "/Users/kyancey/Documents/GitHub/det-grade/.pyenv2/lib/python3.10/site-packages/dvc/cli/command.py", line 26, in do_run
    return self.run()
  File "/Users/kyancey/Documents/GitHub/det-grade/.pyenv2/lib/python3.10/site-packages/dvc/commands/data_sync.py", line 31, in run
    stats = self.repo.pull(
  File "/Users/kyancey/Documents/GitHub/det-grade/.pyenv2/lib/python3.10/site-packages/dvc/repo/__init__.py", line 64, in wrapper
    return f(repo, *args, **kwargs)
  File "/Users/kyancey/Documents/GitHub/det-grade/.pyenv2/lib/python3.10/site-packages/dvc/repo/pull.py", line 31, in pull
    processed_files_count = self.fetch(
  File "/Users/kyancey/Documents/GitHub/det-grade/.pyenv2/lib/python3.10/site-packages/dvc/repo/__init__.py", line 64, in wrapper
    return f(repo, *args, **kwargs)
  File "/Users/kyancey/Documents/GitHub/det-grade/.pyenv2/lib/python3.10/site-packages/dvc/repo/fetch.py", line 105, in fetch
    indexes = _collect_indexes(
  File "/Users/kyancey/Documents/GitHub/det-grade/.pyenv2/lib/python3.10/site-packages/dvc/repo/fetch.py", line 54, in _collect_indexes
    raise collection_exc
  File "/Users/kyancey/Documents/GitHub/det-grade/.pyenv2/lib/python3.10/site-packages/dvc/repo/fetch.py", line 45, in _collect_indexes
    indexes[idx.data_tree.hash_info.value] = idx.data["repo"]
  File "/Users/kyancey/Documents/GitHub/det-grade/.pyenv2/lib/python3.10/site-packages/funcy/objects.py", line 25, in __get__
    res = instance.__dict__[self.fget.__name__] = self.fget(instance)
  File "/Users/kyancey/Documents/GitHub/det-grade/.pyenv2/lib/python3.10/site-packages/dvc/repo/index.py", line 705, in data
    for workspace, data_index in self._index.data.items():
  File "/Users/kyancey/Documents/GitHub/det-grade/.pyenv2/lib/python3.10/site-packages/funcy/objects.py", line 25, in __get__
    res = instance.__dict__[self.fget.__name__] = self.fget(instance)
  File "/Users/kyancey/Documents/GitHub/det-grade/.pyenv2/lib/python3.10/site-packages/dvc/repo/index.py", line 465, in data
    _load_storage_from_out(data_index.storage_map, key, out)
  File "/Users/kyancey/Documents/GitHub/det-grade/.pyenv2/lib/python3.10/site-packages/dvc/repo/index.py", line 163, in _load_storage_from_out
    storage_map.add_cache(ObjectStorage(key, out.cache))
  File "/Users/kyancey/Documents/GitHub/det-grade/.pyenv2/lib/python3.10/site-packages/dvc/output.py", line 527, in cache
    assert self.is_in_repo
AssertionError

2023-12-06 19:50:33,307 DEBUG: Version info for developers:
DVC version: 3.6.0 (pip)
------------------------
Platform: Python 3.10.7 on macOS-13.5-arm64-arm-64bit
Subprojects:
        dvc_data = 2.6.0
        dvc_objects = 0.23.1
        dvc_render = 0.5.3
        dvc_task = 0.3.0
        scmrepo = 1.0.4
Supports:
        http (aiohttp = 3.8.3, aiohttp-retry = 2.8.3),
        https (aiohttp = 3.8.3, aiohttp-retry = 2.8.3),
        s3 (s3fs = 2023.6.0, boto3 = 1.26.161)
Config:
        Global: /Users/kyancey/Library/Application Support/dvc
        System: /Library/Application Support/dvc
Cache types: <https://error.dvc.org/no-dvc-cache>
Caches: local
Remotes: s3
Workspace directory: apfs on /dev/disk2s1s1
Repo: dvc, git
Repo.site_cache_dir: /Library/Caches/dvc/repo/af9f851224cd030c67d9095c8d334465

Having any troubles? Hit us up at https://dvc.org/support, we are always happy to help!
2023-12-06 19:50:33,307 DEBUG: Analytics is enabled.
2023-12-06 19:50:33,348 DEBUG: Trying to spawn '['daemon', '-q', 'analytics', '/var/folders/85/kx9w0l6n6j761xqflb9ydbdm0000gp/T/tmpisr0x3xw']'
2023-12-06 19:50:33,349 DEBUG: Spawned '['daemon', '-q', 'analytics', '/var/folders/85/kx9w0l6n6j761xqflb9ydbdm0000gp/T/tmpisr0x3xw']'

Please upgrade DVC to the latest version, I think the problem you are having was fixed since 3.6.0 that you are using.