SSL 480 error in python requests

I have scripts based on the "Requests" python library. Two different scripts based on the same lib will throw the same error (which is why Tweepy crashes, just like a simple HTTP GET):

xtras/python/requests/api.py", line 44, in request       return
session.request(method=method, url=url, **kwargs)                     
File
"/mnt/sdcard/com.googlecode.pythonforandroid/extras/python/requests/sessions.py",
line 461, in request                                                  
resp = self.send(prep, **send_kwargs)              File
"/mnt/sdcard/com.googlecode.pythonforandroid/extras/python/requests/sessions.py",
line 567, in send    r = adapter.send(request, **kwargs)              
File
"/mnt/sdcard/com.googlecode.pythonforandroid/extras/python/requests/adapters.py",
line 400, in send    raise SSLError(e, request=request)              
requests.exceptions.SSLError: [Errno 1] _ssl.c:480:
error:0D0C50A1:asn1 encoding routines:ASN1_item_verify:unknown message
digest algorithm

      

This has just started happening lately (it used to work fine before). The script runs on an android phone using SL4A.

+3


source to share


1 answer


I had the same problem. As far as I can tell, this issue is caused by the Python version / assembly you have installed on your phone. I am assuming you are using Python 2 apk from Py4a project.



To fix this, you can install the Python 3 apk , which seems to have better SSL support, but if you do, you will need to port your scripts from Python 2 to Python 3.

0


source







All Articles