7

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.

mowliv
  • 125
  • 1
  • 7

2 Answers2

1

it may be because of an outdated "requests"

try to upgrade request with pip3 install --upgrade requests

dominix
  • 273
  • 1
  • 13
0

Try this :

pip install -U urllib3 requests

  • 1
    While this code may answer the question, providing additional context regarding how and/or why it solves the problem would improve the answer's long-term value. – Vickel Dec 19 '22 at 22:29