Closed keenanjohnson closed 2 years ago
Here's the full error trace file for reference: ribbit-network-logs-1633473915601.txt
It looks like it breaks when the db query returns a single dataframe, rather than a list of dataframes? https://github.com/Ribbit-Network/ribbit-network-dashboard/blob/e3ae765f38680bf51ec544383455cf85b91b4ed9/db.py#L9
A fix could be as simple as forcing any dataframe that's returned by itself into a list (e.g. pd.concat(df)
to pd.concat([df])
) but why does the function query_api.query_data_frame() return a dataframe sometimes, and a list of dataframes other times? Because there are multiple tables in the db?
Help on method query_data_frame in module influxdb_client.client.query_api:
query_data_frame(query: str, org=None, data_frame_index: List[str] = None, params: dict = None) method of influxdb_client.client.query_api.QueryApi instance
Execute synchronous Flux query and return Pandas DataFrame.
Note that if a query returns more then one table than the client generates a DataFrame for each of them.
:param query: the Flux query
:param str, Organization org: specifies the organization for executing the query;
take the ID, Name or Organization;
if it's not specified then is used default from client.org.
:param data_frame_index: the list of columns that are used as DataFrame index
:param params: bind parameters
:return:
Yeah that is weird. Seems like a poor way to design an API on the InfluxDB side IMO haha.
@spestana reported the following error on the webpage:
"Just now I was refreshing the dashboard page (I had to re-route some power cords outside so was waiting to see if my frog was reconnected yet), and encountered an "Error loading layout" message on the dashboard site. A couple of page refreshes and it goes away. But then it comes back again sometimes?"
He noticed that his console showed the following local log:
I looked at the Heroku console and saw the following: