question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cli: cannot import name 'isfilelike' from 'fsspec.utils' (2.30.0)

See original GitHub issue

Bug Report

Note that this is not reproducible in a minimal environment, but might server useful if anyone else find the same problem

Description

When running any CLI command I get the following error:

$ dvc version
...
Traceback (most recent call last):
  File "/opt/pyenv/versions/3.9.9/bin/dvc", line 8, in <module>
    sys.exit(main())
  File "/opt/pyenv/versions/3.9.9/lib/python3.9/site-packages/dvc/cli/__init__.py", line 216, in main
    if analytics.is_enabled():
  File "/opt/pyenv/versions/3.9.9/lib/python3.9/site-packages/dvc/analytics.py", line 50, in is_enabled
    Config(validate=False).get("core", {}).get("analytics", "true")
  File "/opt/pyenv/versions/3.9.9/lib/python3.9/site-packages/dvc/config.py", line 99, in __init__
    self.dvc_dir = Repo.find_dvc_dir()
  File "/opt/pyenv/versions/3.9.9/lib/python3.9/site-packages/dvc/repo/__init__.py", line 361, in find_dvc_dir
    root_dir = cls.find_root(root)
  File "/opt/pyenv/versions/3.9.9/lib/python3.9/site-packages/dvc/repo/__init__.py", line 338, in find_root
    if not fs.isdir(root_dir):
  File "/opt/pyenv/versions/3.9.9/lib/python3.9/site-packages/dvc_objects/fs/base.py", line 160, in isdir
    return self.fs.isdir(path)
  File "/opt/pyenv/versions/3.9.9/lib/python3.9/site-packages/funcy/objects.py", line 50, in __get__
    return prop.__get__(instance, type)
  File "/opt/pyenv/versions/3.9.9/lib/python3.9/site-packages/funcy/objects.py", line 28, in __get__
    res = instance.__dict__[self.fget.__name__] = self.fget(instance)
  File "/opt/pyenv/versions/3.9.9/lib/python3.9/site-packages/dvc_objects/fs/local.py", line 194, in fs
    return FsspecLocalFileSystem(**self.config)
  File "/opt/pyenv/versions/3.9.9/lib/python3.9/site-packages/fsspec/spec.py", line 68, in __call__
    obj = super().__call__(*args, **kwargs)
  File "/opt/pyenv/versions/3.9.9/lib/python3.9/site-packages/dvc_objects/fs/local.py", line 21, in __init__
    from ._local import LocalFileSystem as _LocalFileSystem
  File "/opt/pyenv/versions/3.9.9/lib/python3.9/site-packages/dvc_objects/fs/_local.py", line 18, in <module>
    from fsspec.utils import isfilelike, stringify_path
ImportError: cannot import name 'isfilelike' from 'fsspec.utils' (/opt/pyenv/versions/3.9.9/lib/python3.9/site-packages/fsspec/utils.py)

However, this works when installing dvc==2.29.0.

Reproduce

Not reproducible when using the python:3.9.9 docker image and installing dvc==2.30.0. However, in the docker image I’m using, this happens (I know not very useful).

Expected

CLI should work as normal.

Environment information

  • Arch: aarch64
  • OS: Ubuntu 18.04
  • dvc==2.30.0
  • Running DVC inside a docker container
  • Python 3.9.9

Output of dvc doctor: (also broken)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
clintlombardcommented, Oct 17, 2022

@efiop the pip check came back clean. However, on @skshetry’s point I have fsspec==2022.2.0.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImportError: cannot import name 'setup_logging' from 'fsspec ...
7/site-packages/fsspec/utils.py) when executing the final pipeline via kedro run--env sagemaker . I've narrowed this down to dependency issues ...
Read more >
Python ImportError: cannot import name utils - Stack Overflow
I'm having this issue running a script and it looks like it missed some dependencies, but as you can see below. After installing...
Read more >
Source code for fsspec.implementations.local
Source code for fsspec.implementations.local. import datetime import io import logging import ...
Read more >
copr-cli: ImportError: cannot import name InvalidHeader
Description of problem: After installing copr-cli using pip I tried to run it and I got: $ copr-cli Traceback (most recent call last):...
Read more >
fsspec - PyPI
A specification for pythonic filesystems. Install. pip install fsspec. or conda install -c conda-forge fsspec. Purpose. To produce a template or specification ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found