Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
angelitoo776 opened this issue Nov 3, 2023 · 10 comments
Open

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

angelitoo776 opened this issue Nov 3, 2023 · 10 comments

Comments

@angelitoo776
Copy link

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
Copy link

huub66 commented Nov 4, 2023

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

@malakudi
Copy link

malakudi commented Nov 5, 2023

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

@malakudi
Copy link

malakudi commented Nov 5, 2023

Issue has been fixed in weconnect library since July
tillsteinbach/WeConnect-python@ba1c0d0

integration needs to use newer version of the library

@angelitoo776
Copy link
Author

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
Copy link

malakudi commented Nov 5, 2023

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
Copy link
Author

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

@malakudi
Copy link

malakudi commented Nov 5, 2023

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
Copy link
Author

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

@huub66
Copy link

huub66 commented Nov 6, 2023

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

@Maxi531
Copy link

Maxi531 commented Nov 7, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants