fsspec / fsspec/projspec

FileNotFoundError: [Errno 2] No such file or directory: '/.../.git/refs/tags'

Open Beginner friendly
#109 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
24
Forks
8
PR merge metrics
No merged PRs in 30d

Description

Hi 👋

I've tried running the tool in a Git repo that has no tags:

$ uvx projspec scan
Failed to resolve spec FileNotFoundError(2, 'No such file or directory')
Traceback (most recent call last):
  File "/home/max/.cache/uv/archive-v0/S13eoWc95_VgPtDr/lib/python3.12/site-packages/projspec/proj/base.py", line 176, in resolve
    inst.parse()
  File "/home/max/.cache/uv/archive-v0/S13eoWc95_VgPtDr/lib/python3.12/site-packages/projspec/proj/git.py", line 36, in parse
    for _ in self.proj.fs.ls(f"{self.proj.url}/.git/refs/tags", detail=False)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/max/.cache/uv/archive-v0/S13eoWc95_VgPtDr/lib/python3.12/site-packages/fsspec/implementations/local.py", line 61, in ls
    path_info = self.info(path)
                ^^^^^^^^^^^^^^^
  File "/home/max/.cache/uv/archive-v0/S13eoWc95_VgPtDr/lib/python3.12/site-packages/fsspec/implementations/local.py", line 101, in info
    out = os.stat(path, follow_symlinks=False)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/<REDACTED>/.git/refs/tags'

projspec version: 0.4.1

All the other info comes out nicely 👍

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in projspec/proj/git.py at the parse method and inspect the .git/refs/tags listing shown in the traceback. Reproduce with uvx projspec scan in a Git repository with no tags, then make the scan complete without raising FileNotFoundError and verify that the other project information still appears.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.