You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you call the function get_timeseries_from_db, you can also pass additional key word arguments which are automatically added to the filter_document dict. I think this might be a bit confusing. If a user sets a filter_document dict why should he/she additionally pass key word arguments? Therefore, I would remove kwargs here.
Why I stumbled above this problem: I wrote compress_ts_data (same as in write_timeseries_to_db) instead of compressed_ts_data. Maybe also rethink its name, as this can easily happen as new user. A consistent name would help here maybe. What happened then was, that compress_ts_data moved to the filter document dict causing that I ran into a pandahub error.
What I Did
Traceback (most recent call last):
File "C:\Users\sdrauz\anaconda3\envs\pandahub\lib\site-packages\IPython\core\interactiveshell.py", line 3397, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 155, in <cell line: 142>
ts = ph.get_timeseries_from_db(filter_document={'data_type':"p_mw"},
File "C:\Users\sdrauz\git\pandahub\pandahub\lib\PandaHub.py", line 1278, in get_timeseries_from_db
raise PandaHubError("no documents matching the provided filter found", 404)
pandahub.lib.PandaHub.PandaHubError: no documents matching the provided filter found
The text was updated successfully, but these errors were encountered:
Description
If you call the function get_timeseries_from_db, you can also pass additional key word arguments which are automatically added to the filter_document dict. I think this might be a bit confusing. If a user sets a filter_document dict why should he/she additionally pass key word arguments? Therefore, I would remove kwargs here.
Why I stumbled above this problem: I wrote compress_ts_data (same as in write_timeseries_to_db) instead of compressed_ts_data. Maybe also rethink its name, as this can easily happen as new user. A consistent name would help here maybe. What happened then was, that compress_ts_data moved to the filter document dict causing that I ran into a pandahub error.
What I Did
Traceback (most recent call last):
File "C:\Users\sdrauz\anaconda3\envs\pandahub\lib\site-packages\IPython\core\interactiveshell.py", line 3397, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 155, in <cell line: 142>
ts = ph.get_timeseries_from_db(filter_document={'data_type':"p_mw"},
File "C:\Users\sdrauz\git\pandahub\pandahub\lib\PandaHub.py", line 1278, in get_timeseries_from_db
raise PandaHubError("no documents matching the provided filter found", 404)
pandahub.lib.PandaHub.PandaHubError: no documents matching the provided filter found
The text was updated successfully, but these errors were encountered: