Closed yuzhang0302 closed 3 years ago
I get the following error when I try to run this @yuzhang0302
Traceback (most recent call last):
File "/Users/keenan/Documents/GitHub/ghg-cloud-dash/app.py", line 68, in <module>
co2_fig = px.line(get_influxdb_data(), x="_time", y="co2", title="Co2 PPM")
File "/Users/keenan/Documents/GitHub/ghg-cloud-dash/app.py", line 30, in get_influxdb_data
return df.drop(['result', 'table'], axis=1)
File "/Users/keenan/Documents/GitHub/ghg-cloud-dash/venv/lib/python3.9/site-packages/pandas/core/frame.py", line 4308, in drop
return super().drop(
File "/Users/keenan/Documents/GitHub/ghg-cloud-dash/venv/lib/python3.9/site-packages/pandas/core/generic.py", line 4153, in drop
obj = obj._drop_axis(labels, axis, level=level, errors=errors)
File "/Users/keenan/Documents/GitHub/ghg-cloud-dash/venv/lib/python3.9/site-packages/pandas/core/generic.py", line 4188, in _drop_axis
new_axis = axis.drop(labels, errors=errors)
File "/Users/keenan/Documents/GitHub/ghg-cloud-dash/venv/lib/python3.9/site-packages/pandas/core/indexes/base.py", line 5592, in drop
raise KeyError(f"{labels[mask]} not found in axis")
KeyError: "['result' 'table'] not found in axis"
Oh no it's working. I think there was some sort of local cache issue on my end perhaps.
@yuzhang0302 and I discussed this earlier today. She's going to add the feature to update the plot on a periodic basis and add that to this PR. Let me know if you need any help or want to merge this first and then fix the updates in a separate PR @yuzhang0302 !
I resolved the merge conflicts and fixed the updating for the graph :)
Closes #7 This graph doesn't update live though like the CO2 one