mitch-dc / volkswagen_we_connect_id

Apache License 2.0
195 stars 51 forks source link

module 'PIL.Image' has no attribute 'ANTIALIAS' #221

Open angelitoo776 opened 10 months ago

angelitoo776 commented 10 months ago

Hi!

Im having problems to connect to WeConnect ID. Looks like weconnect.py is not able to connect due to this error:

File "/usr/local/lib/python3.11/site-packages/weconnect/elements/vehicle.py", line 591, in updateStatusPicture lightImage = lightImage.resize((64, 64), Image.ANTIALIAS) ^^^^^^^^^^^^^^^ AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'

Does anyone had this error?

Thanks in advance

Here the complete log: Core: 2023.11.0 Supervisor: 2023.10.1 Operating System: 11.1 Frontend: 20231030.1

Logger: homeassistant.config_entries Source: config_entries.py:402 First occurred: 19:23:19 (2 occurrences) Last logged: 19:26:34

Error setting up entry Volkswagen We Connect ID for volkswagen_we_connect_id Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 402, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/volkswagen_we_connect_id/init.py", line 48, in async_setup_entry await hass.async_add_executor_job(_we_connect.update) File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/weconnect/weconnect.py", line 193, in update self.updateVehicles(updateCapabilities=updateCapabilities, updatePictures=updatePictures, force=force, selective=selective) File "/usr/local/lib/python3.11/site-packages/weconnect/weconnect.py", line 213, in updateVehicles vehicle = Vehicle(weConnect=self, vin=vin, parent=self.vehicles, fromDict=vehicleDict, fixAPI=self.fixAPI, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/weconnect/elements/vehicle.py", line 126, in init__ self.update(fromDict, updateCapabilities=updateCapabilities, updatePictures=updatePictures, selective=selective) File "/usr/local/lib/python3.11/site-packages/weconnect/elements/vehicle.py", line 227, in update self.updatePictures() File "/usr/local/lib/python3.11/site-packages/weconnect/elements/vehicle.py", line 457, in updatePictures self.updateStatusPicture() File "/usr/local/lib/python3.11/site-packages/weconnect/elements/vehicle.py", line 591, in updateStatusPicture lightImage = lightImage.resize((64, 64), Image.ANTIALIAS) ^^^^^^^^^^^^^^^ AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'

huub66 commented 10 months ago

Same here, HA core 2023.11.1 and ID.4 with 3.2

malakudi commented 10 months ago

Same here, HA core 2023.11.1 and ID.3 with 3.2

malakudi commented 10 months ago

Issue has been fixed in weconnect library since July https://github.com/tillsteinbach/WeConnect-python/commit/ba1c0d0497c48c7b28e53199747e498e9a1da9c8

integration needs to use newer version of the library

angelitoo776 commented 10 months ago

I did changes in manifest.json, file in /config/custom_components/volkswagen_we_connect_id/

weconnect==0.58.0 to weconnect==0.59.1

this apparently works!

malakudi commented 10 months ago

I did changes in manifest.json, file in /config/custom_components/volkswagen_we_connect_id/

weconnect==0.58.0 to weconnect==0.59.1

this apparently works!

You are running "beta" marked 0.1.9? I have 0.1.8 and has weconnect==0.55.1

angelitoo776 commented 10 months ago

No, I have 0.1.8. If you check the GitHub 0.1.8 version the weconnect version is 0.58.0

malakudi commented 10 months ago

No, I have 0.1.8. If you check the GitHub 0.1.8 version the weconnect version is 0.58.0

No it is not https://github.com/mitch-dc/volkswagen_we_connect_id/blob/v0.1.8/custom_components/volkswagen_we_connect_id/manifest.json

edit: I updated to 0.1.9 with 0.58.0 and it works OK at my side I don't understand why 0.1.9 is marked as beta for HACS

edit 2: Ok I got it now, in https://github.com/mitch-dc/volkswagen_we_connect_id/releases 0.1.9 is shown as pre-release.

angelitoo776 commented 10 months ago

You are absolutely right! I thought I was looking to the v0.1.8 but its version v0.1.9 (pre-release)

huub66 commented 10 months ago

How could I select the pre-release to be installed via HACS?

Maxi531 commented 10 months ago

How could I select the pre-release to be installed via HACS?

you go into hacs, select "Volkswagen We Connect ID" then click the 3 Buttons in the top right, select "Redownload", then click "show beta versions" and then select 0.1.9 and click download. Don't forget to restart after the download has completed