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

lifx fails to import on 32-bit systems with 2024.4.4 because of bitstring 4.2.0 update #116079

Closed
ELY3M opened this issue Apr 24, 2024 · 7 comments

Comments

@ELY3M
Copy link

ELY3M commented Apr 24, 2024

The problem

Logger: homeassistant.config_entries
Source: config_entries.py:2589
First occurred: 12:05:53 AM (6 occurrences)
Last logged: 12:06:40 AM

Error occurred loading flow for integration lifx: Exception importing homeassistant.components.lifx.config_flow

Logger: homeassistant.loader
Source: loader.py:1232
First occurred: 12:05:53 AM (4 occurrences)
Last logged: 12:06:40 AM

Unexpected exception importing platform homeassistant.components.lifx.config_flow
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 1232, in _load_platform
cache[full_name] = self._import_platform(platform_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1264, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1310, in _find_and_load_unlocked
File "", line 488, in _call_with_frames_removed
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/usr/src/homeassistant/homeassistant/components/lifx/init.py", line 11, in
from aiolifx.aiolifx import Light
File "/usr/local/lib/python3.12/site-packages/aiolifx/init.py", line 1, in
from .aiolifx import LifxDiscovery, LifxScan
File "/usr/local/lib/python3.12/site-packages/aiolifx/aiolifx.py", line 29, in
from .msgtypes import *
File "/usr/local/lib/python3.12/site-packages/aiolifx/msgtypes.py", line 11, in
import bitstring
File "/usr/local/lib/python3.12/site-packages/bitstring/init.py", line 197, in
DtypeDefinition('uintle', Bits._setuintle, Bits._getuintle, int, False, uint_bits2chars,
File "/usr/local/lib/python3.12/site-packages/bitstring/dtypes.py", line 275, in init
if self.allowed_lengths:
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/bitstring/dtypes.py", line 244, in len
return len(self.value)
^^^^^^^^^^^^^^^
OverflowError: Python int too large to convert to C ssize_t

Logger: homeassistant.setup
Source: setup.py:316
First occurred: 12:05:10 AM (1 occurrences)
Last logged: 12:05:10 AM

Setup failed for 'lifx': Unable to import component: Exception importing homeassistant.components.lifx
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 1037, in _get_component
ComponentProtocol, importlib.import_module(self.pkg_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/usr/src/homeassistant/homeassistant/components/lifx/init.py", line 11, in
from aiolifx.aiolifx import Light
File "/usr/local/lib/python3.12/site-packages/aiolifx/init.py", line 1, in
from .aiolifx import LifxDiscovery, LifxScan
File "/usr/local/lib/python3.12/site-packages/aiolifx/aiolifx.py", line 29, in
from .msgtypes import *
File "/usr/local/lib/python3.12/site-packages/aiolifx/msgtypes.py", line 11, in
import bitstring
File "/usr/local/lib/python3.12/site-packages/bitstring/init.py", line 197, in
DtypeDefinition('uintle', Bits._setuintle, Bits._getuintle, int, False, uint_bits2chars,
File "/usr/local/lib/python3.12/site-packages/bitstring/dtypes.py", line 275, in init
if self.allowed_lengths:
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/bitstring/dtypes.py", line 244, in len
return len(self.value)
^^^^^^^^^^^^^^^
OverflowError: Python int too large to convert to C ssize_t

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

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 979, in async_get_component
comp = await self.hass.async_add_import_executor_job(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1048, in _get_component
raise ImportError(f"Exception importing {self.pkg_path}") from err
ImportError: Exception importing homeassistant.components.lifx

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 1037, in _get_component
ComponentProtocol, importlib.import_module(self.pkg_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/usr/src/homeassistant/homeassistant/components/lifx/init.py", line 11, in
from aiolifx.aiolifx import Light
File "/usr/local/lib/python3.12/site-packages/aiolifx/init.py", line 1, in
from .aiolifx import LifxDiscovery, LifxScan
File "/usr/local/lib/python3.12/site-packages/aiolifx/aiolifx.py", line 29, in
from .msgtypes import *
File "/usr/local/lib/python3.12/site-packages/aiolifx/msgtypes.py", line 11, in
import bitstring
File "/usr/local/lib/python3.12/site-packages/bitstring/init.py", line 197, in
DtypeDefinition('uintle', Bits._setuintle, Bits._getuintle, int, False, uint_bits2chars,
File "/usr/local/lib/python3.12/site-packages/bitstring/dtypes.py", line 275, in init
if self.allowed_lengths:
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/bitstring/dtypes.py", line 244, in len
return len(self.value)
^^^^^^^^^^^^^^^
OverflowError: Python int too large to convert to C ssize_t

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

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 316, in _async_setup_component
component = await integration.async_get_component()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 997, in async_get_component
self._component_future.result()
File "/usr/src/homeassistant/homeassistant/loader.py", line 989, in async_get_component
comp = self._get_component()
^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1048, in _get_component
raise ImportError(f"Exception importing {self.pkg_path}") from err
ImportError: Exception importing homeassistant.components.lifx

Logger: homeassistant.loader
Source: loader.py:1037
First occurred: 12:05:09 AM (2 occurrences)
Last logged: 12:05:09 AM

Unexpected exception importing component homeassistant.components.lifx
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 1037, in _get_component
ComponentProtocol, importlib.import_module(self.pkg_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/usr/src/homeassistant/homeassistant/components/lifx/init.py", line 11, in
from aiolifx.aiolifx import Light
File "/usr/local/lib/python3.12/site-packages/aiolifx/init.py", line 1, in
from .aiolifx import LifxDiscovery, LifxScan
File "/usr/local/lib/python3.12/site-packages/aiolifx/aiolifx.py", line 29, in
from .msgtypes import *
File "/usr/local/lib/python3.12/site-packages/aiolifx/msgtypes.py", line 11, in
import bitstring
File "/usr/local/lib/python3.12/site-packages/bitstring/init.py", line 197, in
DtypeDefinition('uintle', Bits._setuintle, Bits._getuintle, int, False, uint_bits2chars,
File "/usr/local/lib/python3.12/site-packages/bitstring/dtypes.py", line 275, in init
if self.allowed_lengths:
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/bitstring/dtypes.py", line 244, in len
return len(self.value)
^^^^^^^^^^^^^^^
OverflowError: Python int too large to convert to C ssize_t

What version of Home Assistant Core has the issue?

core-2024.4.4

What was the last working version of Home Assistant Core?

2024.4.3

What type of installation are you running?

Home Assistant OS

Integration causing the issue

lifx

Link to integration documentation on our website

https://www.home-assistant.io/integrations/lifx

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

@ELY3M ELY3M changed the title lifx is not working anymore after update to . the lifx configs do not load. logs included. lifx is not working anymore after update to 2024.4.4 the lifx configs do not load. logs included. Apr 24, 2024
@ELY3M
Copy link
Author

ELY3M commented Apr 24, 2024

for now, I have to restore from my full backup. I am back to 2024.4.3 and lifx is working.

@bdraco
Copy link
Member

bdraco commented Apr 24, 2024

scott-griffiths/bitstring#317

@skynet01
Copy link
Contributor

Ok glad i wasnt the only one

@bdraco bdraco changed the title lifx is not working anymore after update to 2024.4.4 the lifx configs do not load. logs included. lifx fails to import on 32-bit systems with 2024.4.4 because of bitstring 4.2.0 update Apr 24, 2024
@scott-griffiths
Copy link

Hopefully this should now be fixed from my end - I've just released version 4.2.1 of bitstring which should address the problem (although it's hard to test on 32-bit Python!)

@bdraco
Copy link
Member

bdraco commented Apr 24, 2024

Thanks, it should automaticlly get included in 2024.5.0b1 later this week and 2024.5.0 final on May 1st

@bdraco
Copy link
Member

bdraco commented May 6, 2024

This has been reported as fixed in #116369 (comment)

@bdraco bdraco closed this as completed May 6, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jun 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants