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

Problem with dead symlinks #37

Closed
RoboMagus opened this issue Apr 25, 2022 · 1 comment
Closed

Problem with dead symlinks #37

RoboMagus opened this issue Apr 25, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@RoboMagus
Copy link

I was browsing my home assistant error logs and I found this:

This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/watchman/utils.py:255
Integration: Watchman (documentation, issues)
First occurred: 20:35:04 (1 occurrences)
Last logged: 20:35:04

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/watchman/__init__.py", line 257, in async_on_home_assistant_started
    parse_config(hass, reason="HA restart")
  File "/config/custom_components/watchman/__init__.py", line 330, in parse_config
    entity_list, service_list, files_parsed, files_ignored = parse(
  File "/config/custom_components/watchman/utils.py", line 255, in parse
    for i, line in enumerate(open(yaml_file, encoding="utf-8")):
FileNotFoundError: [Errno 2] No such file or directory: '/config/ext/crowdsec/parsers/http-logs.yaml'

I'm mounting some shared volumes into home assistant so I can modify their configurations within automations, one of which belongs to CrowdSec. Sadly this places a bunch of symlinks into that directory which, when not inside the CrowdSec image, result into inaccesible symlinks.

For my config I'll just add anything external to the ignore list, but properly handling this exception would improve this plugin.
By the way; Love the insight this gives me! Takes a lot of the gueswork out of cleaning up old deprecated stuff from my configuration.

@dummylabs
Copy link
Owner

Fixed in v0.5.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants