tillsteinbach / WeConnect-python

Python API for the Volkswagen WeConnect Services
MIT License
105 stars 28 forks source link

service not known error using the example - cupra born #143

Closed schraub07 closed 11 months ago

schraub07 commented 11 months ago

Describe the bug Hi Guys, i ve tried to use the example file allVehicles.py but getting the following error :

Failed to resolve 'login.apps.emea.vwapps.io' ([Errno -2] Name or service not known)"))

To Reproduce

  1. I took the steps to checkout and install weconnect from the following thread. https://github.com/tillsteinbach/WeConnect-python/issues/26#issuecomment-994787574

  2. after successful installation trying to use the example file for a first connection a am getting the error Failed to resolve 'login.apps.emea.vwapps.io' ([Errno -2] Name or service not known)"))

Screenshots If applicable, add screenshots to help explain your problem.

Logs

Initialize WeConnect

Login

Traceback (most recent call last): File "/home/pi/.local/lib/python3.7/site-packages/urllib3/connection.py", line 207, in _new_conn socket_options=self.socket_options, File "/home/pi/.local/lib/python3.7/site-packages/urllib3/util/connection.py", line 60, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): File "/usr/lib/python3.7/socket.py", line 748, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -2] Name or service not known

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/pi/.local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 802, in urlopen **response_kw, File "/home/pi/.local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 491, in _make_request raise new_e File "/home/pi/.local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 467, in _make_request self._validate_conn(conn) File "/home/pi/.local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 1092, in _validate_conn conn.connect() File "/home/pi/.local/lib/python3.7/site-packages/urllib3/connection.py", line 611, in connect self.sock = sock = self._new_conn() File "/home/pi/.local/lib/python3.7/site-packages/urllib3/connection.py", line 210, in _new_conn raise NameResolutionError(self.host, self, e) from e urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPSConnection object at 0x75a00f70>: Failed to resolve 'login.apps.emea.vwapps.io' ([Errno -2] Name or service not known)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/pi/.local/lib/python3.7/site-packages/requests/adapters.py", line 497, in send chunked=chunked, File "/home/pi/.local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 889, in urlopen response_kw, File "/home/pi/.local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 889, in urlopen response_kw, File "/home/pi/.local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 889, in urlopen **response_kw, File "/home/pi/.local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 845, in urlopen method, url, error=new_e, _pool=self, _stacktrace=sys.exc_info()[2] File "/home/pi/.local/lib/python3.7/site-packages/urllib3/util/retry.py", line 515, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='login.apps.emea.vwapps.io', port=443): Max retries exceeded with url: /authorize?nonce=MTVtuAJ6sDuobqNi&redirect_uri=cupra://oauth-callback&client_id=3c756d46-f1ba-4d78-9f9a-cff0d5292d51@apps_vw-dilab_com (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x75a00f70>: Failed to resolve 'login.apps.emea.vwapps.io' ([Errno -2] Name or service not known)"))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "allVehicles.py", line 32, in main() File "allVehicles.py", line 21, in main weConnect.login() File "/home/pi/WeConnect-python/weconnect/weconnect.py", line 318, in login tryLoginResponse: requests.Response = self.__session.get(tryLoginUrl, allow_redirects=False) File "/home/pi/.local/lib/python3.7/site-packages/requests/sessions.py", line 602, in get return self.request("GET", url, kwargs) File "/home/pi/.local/lib/python3.7/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, send_kwargs) File "/home/pi/.local/lib/python3.7/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/home/pi/.local/lib/python3.7/site-packages/requests/adapters.py", line 519, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='login.apps.emea.vwapps.io', port=443): Max retries exceeded with url: /authorize?nonce=MTVtuAJ6sDuobqNi&redirect_uri=cupra://oauth-callback&client_id=3c756d46-f1ba-4d78-9f9a-cff0d5292d51@apps_vw-dilab_com (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x75a00f70>: Failed to resolve 'login.apps.emea.vwapps.io' ([Errno -2] Name or service not known)"))

Can you help me? What i am doing wrong? I only want to read the SoC for using it in openWB. Is there an easier way?

Thank you & greeting from Nürnberg

tillsteinbach commented 11 months ago

There is currently no supra support in the library