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
grafana-wtf explore datasources and grafana-wtf explore dashboards in our environment causes this to happen:
Traceback (most recent call last):
File "/home/admin/.local/bin/grafana-wtf", line 8, in <module>
sys.exit(run())
File "/home/admin/.local/lib/python3.10/site-packages/grafana_wtf/commands.py", line 322, in run
results = engine.explore_dashboards(with_data_details=options.data_details, queries_only=options.queries_only)
File "/home/admin/.local/lib/python3.10/site-packages/grafana_wtf/core.py", line 482, in explore_dashboards
ix = Indexer(engine=self)
File "/home/admin/.local/lib/python3.10/site-packages/grafana_wtf/core.py", line 613, in __init__
self.index()
File "/home/admin/.local/lib/python3.10/site-packages/grafana_wtf/core.py", line 617, in index
self.index_dashboards()
File "/home/admin/.local/lib/python3.10/site-packages/grafana_wtf/core.py", line 680, in index_dashboards
item = DatasourceItem.from_payload(item)
File "/home/admin/.local/lib/python3.10/site-packages/grafana_wtf/model.py", line 177, in from_payload
return cls(**payload)
TypeError: DatasourceItem.__init__() got an unexpected keyword argument 'default'
Grafana version 10.2.3
Our instance of Grafana has in the thousands of dashboards, so its unfortunately not feasible for me to find the specific one causing this issue, in order to post the JSON structure. This must have been a somewhat recent dashboard addition that caused this, as ~2 weeks ago this was working fine with no grafana-wtf version change.
As a quick fix on my end I was able to update the DatasourceItem class here:
Hi @jwoodhouse. Thanks for your excellent report and instructions how to work around the problem. Would you be up for submitting a corresponding patch? We will be happy to converge that improvement into another release right away. Cheers.
Using both:
grafana-wtf explore datasources
andgrafana-wtf explore dashboards
in our environment causes this to happen:Grafana version
10.2.3
Our instance of Grafana has in the thousands of dashboards, so its unfortunately not feasible for me to find the specific one causing this issue, in order to post the JSON structure. This must have been a somewhat recent dashboard addition that caused this, as ~2 weeks ago this was working fine with no grafana-wtf version change.
As a quick fix on my end I was able to update the DatasourceItem class here:
grafana-wtf/grafana_wtf/model.py
Lines 161 to 170 in da92328
with an extra argument:
default: Optional[str] = None
The text was updated successfully, but these errors were encountered: