question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No module named 'aiofiles'

See original GitHub issue

Version of HACS

7.0

Describe the bug

Adding hacs to configuration.yaml file breaks hassio when restarting. The validation failed with “Component not found: hacs” before restarting.

The error log tells me that I’m missing aiofiles. I can’t figure out how to add that, do you have any suggestions? The error is duplicated in the log for each component setup.

Debug log

2019-06-15 22:31:01 ERROR (MainThread) [homeassistant.setup] Error during setup of component frontend
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "uvloop/loop.pyx", line 1451, in uvloop.loop.Loop.run_until_complete
  File "/usr/local/lib/python3.7/site-packages/homeassistant/__main__.py", line 290, in setup_and_run_hass
    log_no_color=args.log_no_color)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/bootstrap.py", line 181, in async_from_config_file
    config_dict, hass, enable_log=False, skip_pip=skip_pip)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/bootstrap.py", line 92, in async_from_config_dict
    await _async_set_up_integrations(hass, config)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/bootstrap.py", line 404, in _async_set_up_integrations
    for domain in domains_to_load
  File "/usr/local/lib/python3.7/site-packages/homeassistant/setup.py", line 50, in async_setup_component
    return await task  # type: ignore
  File "/usr/local/lib/python3.7/site-packages/homeassistant/setup.py", line 126, in _async_setup_component
    hass, config, integration)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/config.py", line 773, in async_process_component_config
    component = integration.get_component()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/loader.py", line 130, in get_component
    cache[self.domain] = importlib.import_module(self.pkg_path)
  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/config/custom_components/hacs/__init__.py", line 36, in <module>
    from .frontend.views import (
  File "/config/custom_components/hacs/frontend/views/__init__.py", line 2, in <module>
    from .error import HacsErrorView
  File "/config/custom_components/hacs/frontend/views/error.py", line 10, in <module>
    from ...blueprints import HacsViewBase
  File "/config/custom_components/hacs/blueprints.py", line 3, in <module>
    from .hacsrepositorybase import HacsRepositoryBase
  File "/config/custom_components/hacs/hacsrepositorybase.py", line 13, in <module>
    from .handler.download import async_download_file, async_save_file
  File "/config/custom_components/hacs/handler/download.py", line 4, in <module>
    import aiofiles
ModuleNotFoundError: No module named 'aiofiles'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/setup.py", line 153, in _async_setup_component
    hass, processed_config)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/frontend/__init__.py", line 246, in async_setup
    'kiosk', 'states', 'profile')], loop=hass.loop)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 363, in wait
    return await _wait(fs, timeout, return_when, loop)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 456, in _wait
    await waiter
concurrent.futures._base.CancelledError

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
meichthyscommented, Jul 12, 2019

I’m facing this issue, but numerous restarts don’t seem to help 😕 Any other suggestions would be greatly appreciated.

0reactions
hacs-bot[bot]commented, Feb 2, 2020

This issue is closed, closed issues are ignored.

If you have issues similar to this, please open a seperate issue. https://github.com/custom-components/hacs/issues/new/choose

And remember to fill out the entire issue template 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

StaticFiles Import Results in "No module named 'aiofiles' Error
First Check I added a very descriptive title to this issue. I used the GitHub search to find a similar issue and didn't...
Read more >
aiofiles - PyPI
The aiofiles.os module contains executor-enabled coroutine versions of several useful os functions that deal with files: stat.
Read more >
How to fix "ModuleNotFoundError: No module named 'aiofiles'"
How to fix "ModuleNotFoundError: No module named 'aiofiles'" ... You must first install the package before you can use it in your code....
Read more >
ModuleNotFoundError: No module named 'aiofiles'
Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'aiofiles' How to remove the ModuleNot.
Read more >
No Module Named Aiofiles (On Zaphosting Server)
Now I have uploaded my files of the bot and when I start it up, it says NoModuleFounderror: no module named aiofiles.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found