-
-
Notifications
You must be signed in to change notification settings - Fork 612
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
pip-compile fails if output file already exists #484
Comments
This issue should be fixed in the (unreleased) 1.9.0. Can you check that your use case is covered on the master branch? Thanks. see #477 |
My use case appears to be broken entirely in the master branch (i.e. it does not work even if the output file does not exist). I ran the same command on the same .in file. Here is the version, according to pip-compile --version:
Here is my output: ⇒ pip-compile -v requirements.in -o requirements.txt
Using indexes:
https://pypi.python.org/simple
Traceback (most recent call last):
File "/Users/<username>/.virtualenvs/<virtualenv>/bin/pip-compile", line 9, in <module>
load_entry_point('pip-tools==1.8.3.dev23-ng62d85ea', 'console_scripts', 'pip-compile')()
File "/Users/<username>/.virtualenvs/<virtualenv>/lib/python2.7/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/Users/<username>/.virtualenvs/<virtualenv>/lib/python2.7/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/Users/<username>/.virtualenvs/<virtualenv>/lib/python2.7/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/<username>/.virtualenvs/<virtualenv>/lib/python2.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/Users/<username>/workspace/Local/cloned/pip-tools/piptools/scripts/compile.py", line 183, in cli
primary_packages = {key_from_req(ireq.req) for ireq in constraints if not ireq.constraint}
File "/Users/<username>/workspace/Local/cloned/pip-tools/piptools/scripts/compile.py", line 183, in <setcomp>
primary_packages = {key_from_req(ireq.req) for ireq in constraints if not ireq.constraint}
File "/Users/<username>/workspace/Local/cloned/pip-tools/piptools/utils.py", line 44, in key_from_req
key = req.name
AttributeError: 'NoneType' object has no attribute 'name' |
...revising this comment. It looks like this was broken in 1.8.0 the same way it is broken in 1.8.2. It was broken in a slightly different way in 1.8.1. It worked in 1.7.0 |
OK, this was introduced by 5bf5b97 Will fix and add a test. |
Given a requirements.in file which consists only of the line:
(that is, pull in requirements from the setup.py file one folder up from my requirements.in file)
The first pip-compile run works fine. The second one throws an error. If I delete the file that was generated by the first run, it will work again. There are no permissions issues (tried it with full perms on the file to check).
Environment Versions
Steps to replicate
SUCCESS
FAILURE
Expected result
An updated (or identical) requirements.txt file
Actual result
The text was updated successfully, but these errors were encountered: