strava-uploader
strava-uploader copied to clipboard
Unable to connect to www.strava.com
Hello All, Thanks for the scripts, I did try to use it, but I always have this issue about SSL certificate, I did try both Python 2.7 & 3.7, w/ no Luck. here is the dump of the exception. Any help / fix is very much appreciated.
`C:\Data\Drv_E\Download\strava-uploader>C:\Users\UserAB\AppData\Local\Programs\Python\Python37-32\python.exe uploader.py [2019-10-04 10:43:25,921] [INFO]:Found access token [2019-10-04 10:43:25,922] [DEBUG]:Connecting to Strava Traceback (most recent call last): File "C:\Users\UserAB\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urllib3\connectionpool.py", line 600, in urlopen chunked=chunked) File "C:\Users\UserAB\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urllib3\connectionpool.py", line 343, in _make_request self._validate_conn(conn) File "C:\Users\UserAB\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urllib3\connectionpool.py", line 839, in validate_conn conn.connect() File "C:\Users\UserAB\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urllib3\connection.py", line 344, in connect ssl_context=context) File "C:\Users\UserAB\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urllib3\util\ssl.py", line 345, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File "C:\Users\UserAB\AppData\Local\Programs\Python\Python37-32\lib\ssl.py", line 423, in wrap_socket session=session File "C:\Users\UserAB\AppData\Local\Programs\Python\Python37-32\lib\ssl.py", line 870, in _create self.do_handshake() File "C:\Users\UserAB\AppData\Local\Programs\Python\Python37-32\lib\ssl.py", line 1139, in do_handshake self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1076)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\UserAB\AppData\Local\Programs\Python\Python37-32\lib\site-packages\requests\adapters.py", line 449, in send timeout=timeout File "C:\Users\UserAB\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urllib3\connectionpool.py", line 638, in urlopen _stacktrace=sys.exc_info()[2]) File "C:\Users\UserAB\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urllib3\util\retry.py", line 399, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www.strava.com', port=443): Max retries exceeded with url: /api/v3/athlete?access_token=bfa38b3261462057d03d8dba1bec2145a67193d5 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1076)')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "uploader.py", line 336, in
is strava.com blocked on your computer/network?
if not, could you run this code in python 3.7 and let me know if it runs:
import requests
print(requests.get("http://www.google.com").status)
The code you posted won't run for me in Python 3.7, although this does and I get a 200:
req = requests.get("http://www.google.com")
req.status_code
Using python 3.9 and should work in 3.7. Does this fail? Is there a self signed proxy somewhere in your network? If Google works and Strava fails something is blocking the URL. import requests print(requests.get("https://www.google.com").status_code) print(requests.get("https://www.strava.com").status_code)
do you have a fire wall? if so check if it is blocking strava