-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Poetry fails with GIT dependencies #10218
Comments
@jelmer This looks like something wrong with the |
I'm experiencing the same error ('Tag' object has no ... ) and I've managed to track it down to the repo name. This throws the error:
This doesn't (after renaming the repo):
So it seems it's the dots in the repo name, at least in my case. Using poetry 2.1.1. Later edit: I did a bit of investigating. So, it seems that when the repo name contains dots, the execution flow reaches the
When the repo name contains dashes, the To be clear, I get this exception when I do a HTH |
In my case, I don't even have dashes in repo name. |
Ok, ignore my comment above. It seems the repository name "fixing" the issue was just a coincidence. There was something wrong with the code poetry checked out in Problem was solved by removing |
Nevertheless, wiping out However I see this result:
looks like pointing at a tag that doesn't exist? |
FWIW, this seems to work fine with Dulwich itself:
Though that's not cloning the specific tag, since that - as @dimbleby mentions - doesn't exist (anymore?). |
This was just a copy/paste error. I guarantee that I tested with a ref that actually exists. I fixed the issue description. |
well then I do not reproduce - works fine on my machine which supports the idea that there is some state on your machine that is for some reason problematic suggest - as above - removing the existing checkout in your venv (or even the whole env) and trying over. if you can provide a way to reproduce whatever state you are in then it may be possible to figure out how to avoid getting there. If not, then likely not. |
I can confirm deleting and recreating the environment works. |
|
Ah! Thanks @dimbleby and @IngLP for your very timely posts here. I was just wrestling with the same error message and you have pointed me to the very simple solution. 😌 In my case, I was trying to install a tag from a private Git repo I maintain. I had sneakily recreated this tag to correct a mistake, but I had run poetry install before doing so and left a copy of the first version of the tag on my laptop virtual environment. I assumed the dodgy tag history was part of the problem, but I was wasting my time clearing out every Poetry cache I could find and not thinking about the virtual env. 🤦 All good now! |
Super helpful thread - thanks. I ended up with an inexplicable
... the nuclear option 😳 ... but it worked! 🚀 |
Description
Poetry fails to add a git dependency with the error:
AttributeError
'Tag' object has no attribute 'parents'
Workarounds
NO Workarounds! I am stuck!!
Poetry Installation Method
pip
Operating System
macOS 15.3.1
Poetry Version
2.1.1
Poetry Configuration
Python Sysconfig
sysconfig.txt
sysconfig.log
Example pyproject.toml
Poetry Runtime Logs
poetry-runtime.log
The text was updated successfully, but these errors were encountered: