-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
No module named 'requests.packages.urllib3.packages.six' // requests on python3.6 Lambda #3985
Comments
It looks extremely likely that urllib3 has been torn apart in some way. Where are you getting that urllib3 from? Does it reproduce with just the code |
Yes, the error is recreated with just |
So this strongly suggests that your packaging tool is not noticing a vendored package inside urllib3 (specifically, six). |
Yep, |
No problem at all, happy to help. 😄 |
Major fail on my part. Bug origin: Miserlou/Zappa#581 |
TL;DR - we were making some optimizations for the python2.7 environment that turned into bugs in the new python3.6 environment. |
I know this might not be the most correct place to ask this (maybe open another issue in zappa?) but I'm having the exact same error in python 2.7, with Zappa. Any clues? Edit: the error is the same, but this time it's raised from inside elasticsearch, then urllib3 |
@jonathanglima this is absolutely not the correct place to look for Zappa support. It would seem @Miserlou fixed Zappa though so you may try using a new version or reporting a bug as that fix may have regressed. Cheers! |
Yeah, I know. I'm not looking for Zappa support. Just looking for some fix that solved this specific bug, since I already tried an update without any success. I'll open a ticket @ Zappa. Sorry for the disturbance. |
Hey all!
Note: This issue may be out of scope for the requests project, I'm not sure, but honestly I'd really appreciate your help in explaining the rationale behind some of the behavior related to this section of the codebase (related PR discussion). Let me know if this ticket is out of scope and we can move the discussion back downstream.
I'm currently working on adding Python3.6 support to Zappa - it pretty much works, except for the requests library. Any time
import requests
is called, this happens:It looks to me like the vendoring of requests's urllib3 is conflicting with the urllib3 in the Lambda environment.
I'd really prefer not to add a special case for the import of requests - is there a recommended way of packaging or configuring of requests that avoids this problem?
(For some context, for those who don't know how Zappa works, we are creating a virtual environment one system, packaging it up into a zip and deploying it to another system, which may or may not be on the same operating system. For pure-python projects, this isn't usually a problem, but since there is some operating-system dependent logic here, maybe it is here, although it hasn't been a problem for the 2.7 environment.)
Any ideas what's happening here?
Thanks!
The text was updated successfully, but these errors were encountered: