-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
setup.py test fails with ImportError: No module named packages.urllib3.response #722
Comments
I am way out of my comfort zone with this one. I am not really sure what is going on. I am confused with the requests.packages. bit. I can import urllib3.response just fine but not with the requests.packages. bit preprended:
|
Seems that you are using an old version of requests from your system. I'm not sure but I think you need at least 2.0. |
You have to give me more credit than that, Debian has requests 2.2.1. If I am going to waste your time I am going to at least try and make it challenging. I think I found the problem but it does not make any sense to me. It seems debian has ripped out the packages.urllib3 bit. The patch is: Does that make any sense? Is this a Debian bug or a responses bug? |
Well, that's a mysterious one. In my experience, Debian doesn't like people to "vendor" packages (include another package's source internally), which is exactly what requests is doing here. Their solution is to modify all packages that do vendoring to instead depend on the corresponding external Debian package. Normally this is fine, but here responses is depending on the existence of the vendored urllib3. I'm not sure what the right solution to this is. It would appear that responses is totally broken on Debian—surely someone else must have run into this before? |
Dropbox accepted my pull request: getsentry/responses#12 This is no longer an issue for me. I am not sure how long it takes for the patch to propagate, but once it does there should be no problem. Seeing as I am the only one that was troubled by this I am going to close this. Thanks for all your help samps and geiger. |
Excellent news! I'm glad this was a comparatively easy fix. Thanks for sticking with it. |
I'm also getting this problem on ubuntu 14.04 when running tests (in test_art.py) but I don't get how you solved it, could you explain it ? Strangely enough, the artfetch plugin works fine, it's only the tests that fail. thanks |
Pierre, I do not understand how/when new versions of responses eggs get created and added to the ecosystem. (Maybe @geigerzaehler or @sampsyo know how this works) Eventually the fix I submitted should get populated but until then you can fix it manually. I am assuming you did:
and you received an error like:
Take this file: https://raw.githubusercontent.com/dropbox/responses/master/responses.py and copy it BEETS-SRC-DIR/responses-0.2.0-py2.7.egg/ If you want to see the changes to responses.py: getsentry/responses@712f5c9 Then rerun your tests and everything should work.
|
I am having trouble building the latest beets. (Ignore the versioned beets directory. this is just part of uupdate and building the debian package)
I can run
python setup.py build
with no problems:When I try
python setup.py test
I get the following error:The text was updated successfully, but these errors were encountered: