Skip to content

pull/repro: filesystem-related commands crash with ImportError (cannot import name 'fsspec_loop' from 'fsspec.asyn'`) for dvc[azure]  #34

Closed
@mmikolajczak

Description

@mmikolajczak

Bug Report

Description

Working with dvc[azure], installed as of 22.01.2023 (same with dependencies, generally fresh virtual environment), on previously working codebase, which was downloaded from version control – and executing DVC commands (such as pull/repro) results in a following error being thrown:
ERROR: unexpected error - azure is supported, but requires 'dvc-azure' to be installed: cannot import name 'fsspec_loop' from 'fsspec.asyn'

This issue seems like it is caused by some recent changes in the interface of fsspec – its new version was just released three days ago looking at the release history: https://pypi.org/project/fsspec/#history and DVC does not pin it to a specific release if I can see correctly.
When fsspec is manually downgraded to a previous version (pip install fsspec==2022.11.0), dvc commands work as intended.

Reproduce

Run filesystem-related commands (e.g. pull/repro) with dvc[azure] and the most recent fsspec version (fsspec==2023.1.0) installed.

Expected

Commands "getting through"/following with their actual logic without the described error.

Environment information

Output of dvc doctor:

$ dvc doctor

DVC version: 2.37.0 (pip)
---------------------------------
Platform: Python 3.10.6 on Linux-5.15.0-56-generic-x86_64-with-glibc2.35
Subprojects:
        dvc_data = 0.28.4
        dvc_objects = 0.14.0
        dvc_render = 0.0.15
        dvc_task = 0.1.6
        dvclive = 1.3.2
        scmrepo = 0.1.4
Supports:
        azure (adlfs = 2023.1.0, knack = 0.10.1, azure-identity = 1.12.0),
        http (aiohttp = 3.8.3, aiohttp-retry = 2.8.3),
        https (aiohttp = 3.8.3, aiohttp-retry = 2.8.3)
Cache types: reflink, hardlink, symlink
Cache directory: xfs on /dev/sda1
Caches: local
Remotes: azure
Workspace directory: xfs on /dev/sda1
Repo: dvc, git

Additional Information (if any):

While I tested it on Azure specifically and marked it in the title as such, other providers might probably be affected as well.
Other than the version from dvc doctor output above, I tested it with dvc[azure] versions 2.8.3 and 2.42 (latest on PyPI) – the same error occurred in both, in 2.8.3 it even crashed when using just dvc without following the command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions