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

regression upgrading to 2025.3.2 from 2025.3.1 - failed to import pyasn1 #140470

Open
pleasantone opened this issue Mar 12, 2025 · 1 comment
Open
Assignees

Comments

@pleasantone
Copy link
Contributor

The problem

Upon first startup after migrating to 2025.3.2 the brother integration craps out with a failure to import pyasn1.
I seem to recall we revved that module in core recently?

What version of Home Assistant Core has the issue?

core-2025.3.2

What was the last working version of Home Assistant Core?

core-2025.3.1

What type of installation are you running?

Home Assistant OS

Integration causing the issue

brother

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.setup
Source: setup.py:340
First occurred: 11:27:53 AM (1 occurrences)
Last logged: 11:27:53 AM

Setup failed for 'brother': Unable to import component: No module named 'pyasn1'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 340, in _async_setup_component
    component = await integration.async_get_component()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1034, in async_get_component
    self._component_future.result()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1014, in async_get_component
    comp = await self.hass.async_add_import_executor_job(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        self._get_component, True
        ^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1074, in _get_component
    ComponentProtocol, importlib.import_module(self.pkg_path)
                       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  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 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/brother/__init__.py", line 5, in <module>
    from brother import Brother, SnmpError
  File "/usr/local/lib/python3.13/site-packages/brother/__init__.py", line 13, in <module>
    from pysnmp.hlapi.asyncio import (
    ...<6 lines>...
    )
  File "/usr/local/lib/python3.13/site-packages/pysnmp/hlapi/asyncio/__init__.py", line 8, in <module>
    from pysnmp.proto.rfc1902 import *
  File "/usr/local/lib/python3.13/site-packages/pysnmp/proto/rfc1902.py", line 7, in <module>
    from pyasn1.type import univ, tag, constraint, namedtype, namedval
ModuleNotFoundError: No module named 'pyasn1'

Additional information

No response

@home-assistant
Copy link

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

Code owner commands

Code owners of brother 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 brother 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)


brother documentation
brother source
(message by IssueLinks)

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