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
pip-sync raises an AttributeError: 'NoneType' object has no attribute 'specifier' error when you try and run it with multiple requirements files that each include an editable install for the same package.
Environment Versions
OS Type: Linux
Python version: Python 3.9.11
pip version: pip 22.3
pip-tools version: pip-compile, version 6.9.0
Steps to replicate
Create a setup.py, dev_requirements.in, requirements.in file
I expected the editable package to install once. Similar to running pip install -r requirements.txt -r dev_requirements.txt
Actual result
pip-sync raised an error
Full stack trace
➜ scratch pip-sync requirements.txt dev_requirements.txt
Traceback (most recent call last):
File "/home/vivek/.pyenv/versions/3.9.11/bin/pip-sync", line 8, in <module>
sys.exit(cli())
File "/home/vivek/.pyenv/versions/3.9.11/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/vivek/.pyenv/versions/3.9.11/lib/python3.9/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/vivek/.pyenv/versions/3.9.11/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/vivek/.pyenv/versions/3.9.11/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/vivek/.pyenv/versions/3.9.11/lib/python3.9/site-packages/piptools/scripts/sync.py", line 146, in cli
merged_requirements = sync.merge(requirements, ignore_conflicts=force)
File "/home/vivek/.pyenv/versions/3.9.11/lib/python3.9/site-packages/piptools/sync.py", line 115, in merge
if ireq.specifier != existing_ireq.specifier:
File "/home/vivek/.pyenv/versions/3.9.11/lib/python3.9/site-packages/pip/_internal/req/req_install.py", line 245, in specifier
return self.req.specifier
AttributeError: 'NoneType' object has no attribute 'specifier'
...
The text was updated successfully, but these errors were encountered:
pip-sync raises an
AttributeError: 'NoneType' object has no attribute 'specifier'
error when you try and run it with multiple requirements files that each include an editable install for the same package.Environment Versions
Steps to replicate
Expected result
I expected the editable package to install once. Similar to running
pip install -r requirements.txt -r dev_requirements.txt
Actual result
pip-sync
raised an errorFull stack trace
...
The text was updated successfully, but these errors were encountered: