You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My project is depending on a lot of git repositories. These packages are also dependent on other git repositories.
When I generate one requirements.txt then I do pip-sync it works fine. But when I generate one requirements.txt and one requirements-dev.txt, when I do pip-sync requirements.txt requirements-dev.txt then I get this error:
Traceback (most recent call last):
File "/Users/fj/PycharmProjects/my-project/.venv/bin/pip-sync", line 8, in <module>
sys.exit(cli())
File "/Users/fj/PycharmProjects/my-project/.venv/lib/python3.7/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/Users/fj/PycharmProjects/my-project/.venv/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/Users/fj/PycharmProjects/my-project/.venv/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/fj/PycharmProjects/my-project/.venv/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/Users/fj/PycharmProjects/my-project/.venv/lib/python3.7/site-packages/piptools/scripts/sync.py", line 123, in cli
merged_requirements = sync.merge(requirements, ignore_conflicts=force)
File "/Users/fj/PycharmProjects/my-project/.venv/lib/python3.7/site-packages/piptools/sync.py", line 116, in merge
if ireq.specifier != existing_ireq.specifier:
File "/Users/fj/PycharmProjects/my-project/.venv/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 263, in specifier
return self.req.specifier
AttributeError: 'NoneType' object has no attribute 'specifier'
and requirements-dev.txt contains the same package which is a sub-dependency of another git repository.
So I tried to debug it, by adding a print into piptools/sync.py line 113:
# NOTE: We check equality here since we can assume that the# requirements are all pinnedprint(ireq, " - ", existing_ireq, " - ", ireq.req, " - ", existing_ireq.req, " - ", key)
ifireq.specifier!=existing_ireq.specifier:
raiseIncompatibleRequirements(ireq, existing_ireq)
ireq.req and existing_ireq.req are None. I think they don't know the package name. Because if I edit the requirements.txt from this: git+ssh://[email protected]/private-bucket/[email protected]
into that: enums @ git+ssh://[email protected]/private-bucket/[email protected]
Hello everyone,
My project is depending on a lot of git repositories. These packages are also dependent on other git repositories.
When I generate one
requirements.txt
then I dopip-sync
it works fine. But when I generate onerequirements.txt
and onerequirements-dev.txt
, when I dopip-sync requirements.txt requirements-dev.txt
then I get this error:requirements.txt
contains:and
requirements-dev.txt
contains the same package which is a sub-dependency of another git repository.So I tried to debug it, by adding a print into
piptools/sync.py
line 113:And this is the output:
ireq.req
andexisting_ireq.req
areNone
. I think they don't know the package name. Because if I edit therequirements.txt
from this:git+ssh://[email protected]/private-bucket/[email protected]
into that:
enums @ git+ssh://[email protected]/private-bucket/[email protected]
Then the output seems correct:
And
pip-sync
works.Also, if I only update the
requirements.txt
to PEP 508 format, it works as well.Thanks for your help, I hope I was clear, please let me know if you have any question, I'll be happy to give you more details!
Environment Versions
Steps to replicate
requirements.in
andrequirements-dev.in
Expected result
It should install.
Actual result
It fails.
The text was updated successfully, but these errors were encountered: