Coder Social home page Coder Social logo

Comments (10)

addons-assistant avatar addons-assistant commented on July 20, 2024

👋 Thanks for opening your first issue here! If you're reporting a 🐛 bug, please make sure you include steps to reproduce it. Also, logs, error messages and information about your hardware might be usefull.

from addon-jupyterlab.

Ubira avatar Ubira commented on July 20, 2024

I have a similar problem here.
Trying to run the "GETTING STARTED.ipynb" but throws an error in the first cell:

db = db_from_hass_config()

The log is:


FileNotFoundError Traceback (most recent call last)
in
1 from detective.core import db_from_hass_config
----> 2 db = db_from_hass_config()

/usr/local/lib/python3.6/dist-packages/detective/core.py in db_from_hass_config(path, **kwargs)
17 path = config.find_hass_config()
18
---> 19 url = config.db_url_from_hass_config(path)
20 return HassDatabase(url, **kwargs)
21

/usr/local/lib/python3.6/dist-packages/detective/config.py in db_url_from_hass_config(path)
104 def db_url_from_hass_config(path):
105 """Find the recorder database url from a HASS config dir."""
--> 106 config = load_hass_config(path)
107 default_path = os.path.join(path, "home-assistant_v2.db")
108 default_url = "sqlite:///{}".format(default_path)

/usr/local/lib/python3.6/dist-packages/detective/config.py in load_hass_config(path)
84 def load_hass_config(path):
85 """Load the HASS config."""
---> 86 return load_yaml(os.path.join(path, "configuration.yaml"))
87
88

/usr/local/lib/python3.6/dist-packages/detective/config.py in load_yaml(fname)
99 # If configuration file is empty YAML returns None
100 # We convert that to an empty dict
--> 101 return yaml.load(conf_file) or {}
102
103

/usr/local/lib/python3.6/dist-packages/ruamel/yaml/main.py in load(self, stream)
329 constructor, parser = self.get_constructor_parser(stream)
330 try:
--> 331 return constructor.get_single_data()
332 finally:
333 parser.dispose()

/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py in get_single_data(self)
109 node = self.composer.get_single_node()
110 if node is not None:
--> 111 return self.construct_document(node)
112 return None
113

/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py in construct_document(self, node)
119 self.state_generators = []
120 for generator in state_generators:
--> 121 for _dummy in generator:
122 pass
123 self.constructed_objects = {}

/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py in construct_yaml_map(self, node)
705 data = self.yaml_base_dict_type() # type: Dict[Any, Any]
706 yield data
--> 707 value = self.construct_mapping(node)
708 data.update(value)
709

/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py in construct_mapping(self, node, deep)
424 if isinstance(node, MappingNode):
425 self.flatten_mapping(node)
--> 426 return BaseConstructor.construct_mapping(self, node, deep=deep)
427
428 def construct_yaml_null(self, node):

/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py in construct_mapping(self, node, deep)
243 )
244
--> 245 value = self.construct_object(value_node, deep=deep)
246 if check:
247 if self.check_mapping_key(node, key_node, mapping, key, value):

/usr/local/lib/python3.6/dist-packages/ruamel/yaml/constructor.py in construct_object(self, node, deep)
165 constructor = self.class.construct_mapping
166 if tag_suffix is None:
--> 167 data = constructor(self, node)
168 else:
169 data = constructor(self, tag_suffix, node)

/usr/local/lib/python3.6/dist-packages/detective/config.py in _include_yaml(loader, node)
56 device_tracker: !include device_tracker.yaml
57 """
---> 58 return load_yaml(os.path.join(os.path.dirname(loader.name), node.value))
59
60

/usr/local/lib/python3.6/dist-packages/detective/config.py in load_yaml(fname)
96 yaml.Constructor = HassSafeConstructor
97
---> 98 with open(fname, encoding="utf-8") as conf_file:
99 # If configuration file is empty YAML returns None
100 # We convert that to an empty dict

FileNotFoundError: [Errno 2] No such file or directory: '/config/sensor/binary_sensor/binary_sensor.yaml'


But I have my "binary_sensor.yaml" in "/config/binary_sensor/binary_sensor.yaml". Changing this location gives another similar error, but for the "secrets.yaml".

Besides, if I put:

db = db_from_hass_config("/config")

It gives me the same error, so I believe the problem is not the path.

Is there some workaround for this?

from addon-jupyterlab.

addons-assistant avatar addons-assistant commented on July 20, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from addon-jupyterlab.

kflinderman avatar kflinderman commented on July 20, 2024

Still having the problem with not being able to find the correct path. Not sure how to keep this active.

from addon-jupyterlab.

addons-assistant avatar addons-assistant commented on July 20, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from addon-jupyterlab.

kflinderman avatar kflinderman commented on July 20, 2024

Still cannot load my database. If I should let this hit stale I will, but I'm not sure what's preferred.

from addon-jupyterlab.

addons-assistant avatar addons-assistant commented on July 20, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from addon-jupyterlab.

kflinderman avatar kflinderman commented on July 20, 2024

Tried again today, and still getting the same error

from addon-jupyterlab.

addons-assistant avatar addons-assistant commented on July 20, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from addon-jupyterlab.

addons-assistant avatar addons-assistant commented on July 20, 2024

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

from addon-jupyterlab.

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.