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

Cannot load Unifi Protect integration on 2025.3.4 #141362

Open
trickhub opened this issue Mar 25, 2025 · 2 comments
Open

Cannot load Unifi Protect integration on 2025.3.4 #141362

trickhub opened this issue Mar 25, 2025 · 2 comments

Comments

@trickhub
Copy link

The problem

Hi,

After the most recent update I cannot load (or re-install) the unified protect integration.

I get Config flow could not be loaded: {"message":"Invalid handler specified"}.

What version of Home Assistant Core has the issue?

core-2025.3.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Unifi Protect

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

Anything in the logs that might be useful for us?

Logger: homeassistant.config_entries
Source: config_entries.py:3788
First occurred: 12:09:07 (1 occurrences)
Last logged: 12:09:07

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

Logger: homeassistant.loader
Source: loader.py:1271
First occurred: 12:09:07 (2 occurrences)
Last logged: 12:09:07

Unexpected exception importing platform homeassistant.components.unifiprotect.config_flow
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1271, in _load_platform
    cache[full_name] = self._import_platform(platform_name)
                       ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1303, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
           ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/loop.py", line 201, in protected_loop_func
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.13/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1310, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 1026, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/usr/src/homeassistant/homeassistant/components/unifiprotect/__init__.py", line 9, in <module>
    from uiprotect.api import DEVICE_UPDATE_INTERVAL
  File "/usr/local/lib/python3.13/site-packages/uiprotect/__init__.py", line 5, in <module>
    from .api import ProtectApiClient
  File "/usr/local/lib/python3.13/site-packages/uiprotect/api.py", line 30, in <module>
    from uiprotect.data.convert import list_from_unifi_list
  File "/usr/local/lib/python3.13/site-packages/uiprotect/data/__init__.py", line 3, in <module>
    from .base import (
    ...<5 lines>...
    )
  File "/usr/local/lib/python3.13/site-packages/uiprotect/data/base.py", line 20, in <module>
    from ..utils import (
    ...<7 lines>...
    )
  File "/usr/local/lib/python3.13/site-packages/uiprotect/utils.py", line 34, in <module>
    from .data.types import (
    ...<9 lines>...
    )
  File "/usr/local/lib/python3.13/site-packages/uiprotect/data/types.py", line 11, in <module>
    from pydantic.v1.config import BaseConfig as BaseConfigV1
  File "/usr/local/lib/python3.13/site-packages/pydantic/v1/__init__.py", line 2, in <module>
    from pydantic.v1 import dataclasses
  File "/usr/local/lib/python3.13/site-packages/pydantic/v1/dataclasses.py", line 50, in <module>
    from pydantic.v1.class_validators import gather_all_validators
  File "/usr/local/lib/python3.13/site-packages/pydantic/v1/class_validators.py", line 10, in <module>
    from pydantic.v1.utils import ROOT_KEY, in_ipython
SyntaxError: source code string cannot contain null bytes

Additional information

Protect version: 5.2.62
UNVR Unifi OS Version: 4.1.11

@home-assistant
Copy link

Hey there @RaHehl, mind taking a look at this issue as it has been labeled with an integration (unifiprotect) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of unifiprotect can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign unifiprotect Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


unifiprotect documentation
unifiprotect source
(message by IssueLinks)

@trickhub
Copy link
Author

Still seeing this issue - is there any other details I can add to help?

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

No branches or pull requests

3 participants