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

ImportError: No module named packages.urllib3.response #148

Closed
andredasilvapinto opened this issue May 7, 2014 · 5 comments
Closed

ImportError: No module named packages.urllib3.response #148

andredasilvapinto opened this issue May 7, 2014 · 5 comments

Comments

@andredasilvapinto
Copy link

At locust/clients.py, line 10.

Debian removes the "packages." from "packages.urllib3.response":

http://anonscm.debian.org/viewvc/python-modules/packages/requests/trunk/debian/patches/02_use-system-chardet-and-urllib3.patch?revision=27448&view=markup

you can fix this by catching the exception like this:

try:
    from requests.packages.urllib3.response import HTTPResponse
except ImportError:
    from urllib3.response import HTTPResponse
@heyman heyman closed this as completed in 64d3188 May 9, 2014
@heyman
Copy link
Member

heyman commented May 9, 2014

Omg, why would they they do that?

Thanks for the report! It should be fixed now.

@andredasilvapinto
Copy link
Author

It looks like they are trying to remove dependencies on "vendor" packages. This is where I found the reason behind the problem:
beetbox/beets#722 (comment)

@therealmarv
Copy link

this error is still in the pypi version 0.7.1. Tested on 2014-08-05 on Ubuntu 14.04.1. And BTW: Using a virtualenv was a workaround to not have this issue.

@dwatrous
Copy link

I was able to fix this by opening clients.py and removed "requests.packages." so that it looked like this

from urllib3.response import HTTPResponse

@heyman
Copy link
Member

heyman commented Sep 25, 2014

I've just released Locust 0.7.2 where this is fixed.

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

4 participants