简体   繁体   中英

AWS lambda: RequestsDependencyWarning: urllib3 (1.26.6) or chardet (3.0.4) doesn't match a supported version

I have an AWS lambda program that is getting this warning in logs:

/var/task/requests/ init .py:89: RequestsDependencyWarning: urllib3 (1.26.6) or chardet (3.0.4) doesn't match a supported version!

I have tried fixes mentioned in other threads such as this one but have not been able to resolve this

The odd thing is that in my virtualenv, I have:

chardet==4.0.0
urllib3==1.25.10

... but the warning is complaining about chardet 3.0.4 and urllib 1.26.6. Wondering if this could have something to do with packages being provided by the AWS Lambda environment. I assume that my packages override the defaults they have.

it may be because of an outdated "requests"

try to upgrade request with pip3 install --upgrade requests

Try this:

pip install -U urllib3 requests

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM