Coder Social home page Coder Social logo

Comments (4)

ScrewLooseDan avatar ScrewLooseDan commented on July 20, 2024 1

I figured it out. I installed HACS on my test instance and saw that the name of the folder for the custom component is clean_up_snapshots_service, not as the folder structure in git has it - clean_backups.

On my production HA server I simply did the following, followed by a restart, and no more errors.

mv /config/custom_components/clean_backups/ /config/custom_components/clean_up_snapshots_service

from clean_up_snapshots.

tmonck avatar tmonck commented on July 20, 2024 1

I'll update the documentation to reflect this.

from clean_up_snapshots.

tmonck avatar tmonck commented on July 20, 2024

Let me see. I wasn't seeing this in my instance of homeassistant so I need to see if I can replicate.

from clean_up_snapshots.

ScrewLooseDan avatar ScrewLooseDan commented on July 20, 2024

I wanted to be sure it wasn't something with my HA instance. So, I just made a new test Home Assistant instance and was able to reproduce it.

  • Used VirtualBox to create a new base HA instance. (followed instructions here)
  • Added Community SSH & Web Terminal add-on
  • SSH'd to new instance and used following commands:
  • Created long lived token
  • Added following to configuration.yaml
    • clean_up_snapshots_service:
    • host: http://<ip_addess:8123/
    • token:
    • number_of_snapshots_to_keep: 3

This produced the same errors as on my production Home Assistant:

Logger: homeassistant.helpers.integration_platform
Source: loader.py:535
First occurred: 10:06:38 AM (5 occurrences)
Last logged: 10:06:38 AM

Unexpected error importing clean_up_snapshots_service/recorder.py
Unexpected error importing clean_up_snapshots_service/media_source.py
Unexpected error importing clean_up_snapshots_service/system_health.py
Unexpected error importing clean_up_snapshots_service/logbook.py
Unexpected error importing clean_up_snapshots_service/group.py
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/integration_platform.py", line 33, in _process
    platform = integration.get_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 530, in get_platform
    cache[full_name] = self._import_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 535, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
  File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'custom_components.clean_backups.recorder'

I understand if you only want to support HACS installs, and I'm okay with that. But since I've installed other custom integrations the same way and not had an issue, I figured I would ask.

from clean_up_snapshots.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.