Skip to content
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

Exception during installation from an empty file #47

Closed
mastak opened this issue Jan 14, 2015 · 6 comments
Closed

Exception during installation from an empty file #47

mastak opened this issue Jan 14, 2015 · 6 comments

Comments

@mastak
Copy link

mastak commented Jan 14, 2015

Pip just return a simple message. But when i try install requirements from empty file, pip-accel generate exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.4/site-packages/pip_accel/cli.py", line 53, in main
    accelerator.install_from_arguments(arguments)
  File "/usr/local/lib/python3.4/site-packages/pip_accel/__init__.py", line 179, in install_from_arguments
    requirements = self.get_requirements(arguments)
  File "/usr/local/lib/python3.4/site-packages/pip_accel/__init__.py", line 197, in get_requirements
    return self.unpack_source_dists(arguments)
  File "/usr/local/lib/python3.4/site-packages/pip_accel/__init__.py", line 244, in unpack_source_dists
    requirements = self.get_pip_requirement_set(arguments, use_remote_index=False)
  File "/usr/local/lib/python3.4/site-packages/pip_accel/__init__.py", line 316, in get_pip_requirement_set
    return self.transform_pip_requirement_set(pip.requirement_set)
  File "/usr/local/lib/python3.4/site-packages/pip_accel/__init__.py", line 335, in transform_pip_requirement_set
    for requirement in requirement_set.requirements.values():
AttributeError: 'NoneType' object has no attribute 'requirements'
@xolox
Copy link
Member

xolox commented Jan 14, 2015

Hi Igor,

Thanks for pointing this out, that is indeed not very user friendly. I just published pip-accel 0.22.3 which should resolve the issue you encountered. Can you try it out and let me know whether this is better? Thanks!

@mastak
Copy link
Author

mastak commented Jan 15, 2015

Hi Peter,

Traceback disappeared, but the problem is still there.

The thing in that I am using pip-accel inside Dockerfile (instructions for docker). And pip-accel with empty file return a non-zero code:

"error":"The command [/bin/sh -c pip-accel install -r /opt/checkio_mission/python_27/requirements.txt] returned a non-zero code: 1

And all build breaks down.
But pip works fine in that case.

@xolox
Copy link
Member

xolox commented Jan 15, 2015

Hi Igor,

Thanks for the follow up, I didn't realize your concern was the exit code instead of just the printing of the traceback (you didn't mention the exit code before). I agree that pip-accel should be compatible with pip in this case. I'll try to fix this today.

@mastak
Copy link
Author

mastak commented Jan 15, 2015

Yes, it was my mistake, sorry.

PS Thanks for quick reply.

@xolox
Copy link
Member

xolox commented Feb 13, 2015

Hi Igor,

The problem you reported should now be resolved: The traceback is gone and the exit code is the same as pip (0). Sorry it took so long, especially after I said I'd try to fix this the same day - life got in the way of my open source projects (it does that sometimes :-). If you can confirm whether you agree the problem is resolved that would be appreciated; you can close this issue if so. Thanks for pointing out this incompatibility with pip!

@xolox
Copy link
Member

xolox commented Apr 4, 2015

I'm going to close this issue now because the problem reported here has been fixed for a while now. Thanks for the feedback!

@xolox xolox closed this as completed Apr 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants