Skip to content

Unable to connect to www.strava.com #16

Description

@ash2005

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
main()
File "uploader.py", line 280, in main
athlete = client.get_athlete()
File "C:\Users\UserAB\AppData\Local\Programs\Python\Python37-32\lib\site-packages\stravalib\client.py", line 235, in get_athlete
raw = self.protocol.get('/athlete')
File "C:\Users\UserAB\AppData\Local\Programs\Python\Python37-32\lib\site-packages\stravalib\protocol.py", line 299, in get
return self._request(url, params=params, check_for_errors=check_for_errors, use_webhook_server=use_webhook_server)
File "C:\Users\UserAB\AppData\Local\Programs\Python\Python37-32\lib\site-packages\stravalib\protocol.py", line 215, in _request
raw = requester(url, params=params)
File "C:\Users\UserAB\AppData\Local\Programs\Python\Python37-32\lib\site-packages\requests\sessions.py", line 537, in get
return self.request('GET', url, **kwargs)
File "C:\Users\UserAB\AppData\Local\Programs\Python\Python37-32\lib\site-packages\requests\sessions.py", line 524, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\UserAB\AppData\Local\Programs\Python\Python37-32\lib\site-packages\requests\sessions.py", line 637, in send
r = adapter.send(request, **kwargs)
File "C:\Users\UserAB\AppData\Local\Programs\Python\Python37-32\lib\site-packages\requests\adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='www.strava.com', port=443): Max retries exceeded with url: /api/v3/athlete?access_token=bfa38b3261462057xxxxxxxxxxxxxxxxxxx5 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1076)')))`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions