tillsteinbach / WeConnect-python

Python API for the Volkswagen WeConnect Services
MIT License
109 stars 29 forks source link

MyCupra API Error #202

Open jnsflschr opened 1 month ago

jnsflschr commented 1 month ago

Describe the bug When the MyCupra Session Api is used every call will get a 500. Maybe there are some headers missing but without any documentation there is no way to fix this for me. I used the changes of the branch below to use the already implemented api.

To Reproduce

  1. merge in branch derco0n:cupra_testing
  2. execute allVehicles.py

Expected behavior Return all vehilcels of the MyCupra account

Logs

#  Initialize WeConnect
Selected servicetype is: MyCupra

#  Login
#  update
Traceback (most recent call last):
  File "./allVehicles.py", line 43, in <module>
    main()
  File "./allVehicles.py", line 34, in main
    weConnect.update()
  File "./venv/lib/python3.9/site-packages/weconnect/weconnect.py", line 195, in update
    self.updateVehicles(updateCapabilities=updateCapabilities, updatePictures=updatePictures, force=force, selective=selective)
  File "./venv/lib/python3.9/site-packages/weconnect/weconnect.py", line 206, in updateVehicles
    data = self.fetchData(url, force)
  File "./venv/lib/python3.9/site-packages/weconnect/weconnect.py", line 400, in fetchData
    raise RetrievalError(f'Could not fetch data. Status Code was: {statusResponse.status_code} {statusResponse.text}')
weconnect.errors.RetrievalError: Could not fetch data. Status Code was: 500    

Response

{
    "error": {
        "message": "Internal Server Error"
    }
}

Additional context My goal is to get the data from my Cupra Leon ST (gasoline). If I use the default api is I get an empty list returned. I suppose its because the data is saved at the MyCupra api. That's why used the approach from @derco0n

novisys commented 1 day ago

Any update ?