Skip to content

AttributeError: '_pygit2.Blob' object has no attribute 'hex' #1702

Closed
@mxmlnkn

Description

@mxmlnkn
import fsspec
f = fsspec.open("git://tests/")
print(f.fs.ls("/"))

Results in:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/user/.local/lib/python3.10/site-packages/fsspec/implementations/git.py", line 93, in ls
    "hex": obj.hex,
AttributeError: '_pygit2.Blob' object has no attribute 'hex'

After downgrading with: python3 -m pip install --user --force-reinstall 'pygit2==1.14, it works again. It seems that the API break occurred in 1.15. Seems like they don't follow semantic versioning.

This dependency version requirement should be added to the pyproject.toml, or worked around.

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