Closed quito96 closed 1 year ago
Hmm to debug need to understand what is wrong with the data you are trying to access. You can see the queries being run in https://github.com/robmarkcole/HASS-data-detective/blob/master/detective/core.py so try and debug where this error is coming from
Hi, I started the core.py in jupyter lab (right?) and get this:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In [1], line 10
7 import pandas as pd
8 from sqlalchemy import create_engine, text
---> 10 from . import config, functions
13 def db_from_hass_config(path=None, **kwargs):
14 """Initialize a database from HASS config."""
ImportError: attempted relative import with no known parent package
I am having the exact same issue. Did anyone get this solved? Thanks!
I have the same problem. Also the fetch_all_sensor_data
function returns None
for every sensor in the last_updated
field. I think both of these errors come from a recent change in database schema. last_updated
for example was replaced by last_updated_ts
.
I have the same problem. Also the
fetch_all_sensor_data
function returnsNone
for every sensor in thelast_updated
field. I think both of these errors come from a recent change in database schema.last_updated
for example was replaced bylast_updated_ts
. @bernikr
Wow, thanks! I just substituted all the occurrences of last_updated
into last_updated_ts
in all code and reinstalled the detective and it worked! Now, Instead of getting None for the the field you get timestamp numbers.
Conversion can be easily done by:
df['last_updated_ts'] = pd.to_datetime(df['last_updated_ts'], unit='s')
Hi there,
my first run of GETTING_Started Notebook brings errors:
db = detective.db_from_hass_config()
Successfully connected to database mysql://homeassistant:pwd@192.168.2.40:3306/homeassistant?charset-utf8mb4 There are 381 entities with data
Okay, then start Sequence Popular entities and the error occures:
How can i solve it?
BR