oss-aspen / 8Knot

Dash app in development to serve open source community visualizations using GitHub data from Augur. Hosted app: https://eightknot.osci.io
MIT License
52 stars 61 forks source link

Bugs encountered w/ allin database #663

Closed JamesKunstle closed 7 months ago

JamesKunstle commented 8 months ago

Searchbar = 'chaoss'

For the Package Versions visualization:

dash.exceptions.LongCallbackError: An error occurred inside a long callback: Value of 'names' is not the name of a column in 'data_frame'. Expected one of ['dep_age', 'count'] but received: index To use the index, pass it in directly as `df.index`. Traceback (most recent call last): File "/opt/app-root/lib64/python3.9/site-packages/dash/long_callback/managers/celery_manager.py", line 151, in run user_callback_output = fn(*maybe_progress, *user_callback_args) File "/opt/app-root/src/pages/repo_overview/visualizations/package_version.py", line 117, in package_version_graph fig = px.pie(df, names="index", values="dep_age", color_discrete_sequence=color_seq) File "/opt/app-root/lib64/python3.9/site-packages/plotly/express/_chart_types.py", line 1482, in pie return make_figure( File "/opt/app-root/lib64/python3.9/site-packages/plotly/express/_core.py", line 2076, in make_figure args = build_dataframe(args, constructor) File "/opt/app-root/lib64/python3.9/site-packages/plotly/express/_core.py", line 1485, in build_dataframe df_output, wide_id_vars = process_args_into_dataframe( File "/opt/app-root/lib64/python3.9/site-packages/plotly/express/_core.py", line 1210, in process_args_into_dataframe raise ValueError(err_msg) ValueError: Value of 'names' is not the name of a column in 'data_frame'. Expected one of ['dep_age', 'count'] but received: index To use the index, pass it in directly as `df.index`.

For the Contributor File Heatmap, for grimoirelab-sortinghat:

dash.exceptions.LongCallbackError: An error occurred inside a long callback: 'NoneType' object has no attribute 'count' Traceback (most recent call last): File "/opt/app-root/lib64/python3.9/site-packages/dash/long_callback/managers/celery_manager.py", line 151, in run user_callback_output = fn(*maybe_progress, *user_callback_args) File "/opt/app-root/src/pages/codebase/visualizations/cntrb_file_heatmap.py", line 246, in cntrb_file_heatmap_graph df = process_data(df_file, df_actions, df_file_cntbs, directory, bot_switch) File "/opt/app-root/src/pages/codebase/visualizations/cntrb_file_heatmap.py", line 347, in process_data level = directory.count("/") AttributeError: 'NoneType' object has no attribute 'count'

For Reviewer File Heatmap, for oss-aspen/8Knot:

dash.exceptions.LongCallbackError: An error occurred inside a long callback: 'NoneType' object has no attribute 'count' Traceback (most recent call last): File "/opt/app-root/lib64/python3.9/site-packages/dash/long_callback/managers/celery_manager.py", line 151, in run user_callback_output = fn(*maybe_progress, *user_callback_args) File "/opt/app-root/src/pages/codebase/visualizations/reviewer_file_heatmap.py", line 246, in reviewer_file_heatmap_graph df = process_data(df_file, df_actions, df_file_cntbs, directory, bot_switch) File "/opt/app-root/src/pages/codebase/visualizations/reviewer_file_heatmap.py", line 319, in process_data df_dynamic_directory = cntrb_per_directory_value(directory, df_file) File "/opt/app-root/src/pages/codebase/visualizations/reviewer_file_heatmap.py", line 424, in cntrb_per_directory_value level = directory.count("/") AttributeError: 'NoneType' object has no attribute 'count'
JamesKunstle commented 8 months ago

dash.exceptions.LongCallbackError: An error occurred inside a long callback: Value of 'names' is not the name of a column in 'data_frame'. Expected one of ['dep_age', 'count'] but received: index To use the index, pass it in directly as df.index. Traceback (most recent call last): File "/opt/app-root/lib64/python3.9/site-packages/dash/long_callback/managers/celery_manager.py", line 151, in run user_callback_output = fn(maybe_progress, user_callback_args) File "/opt/app-root/src/pages/repo_overview/visualizations/package_version.py", line 117, in package_version_graph fig = px.pie(df, names="index", values="dep_age", color_discrete_sequence=color_seq) File "/opt/app-root/lib64/python3.9/site-packages/plotly/express/_chart_types.py", line 1482, in pie return make_figure( File "/opt/app-root/lib64/python3.9/site-packages/plotly/express/_core.py", line 2076, in make_figure args = build_dataframe(args, constructor) File "/opt/app-root/lib64/python3.9/site-packages/plotly/express/_core.py", line 1485, in build_dataframe df_output, wide_id_vars = process_args_into_dataframe( File "/opt/app-root/lib64/python3.9/site-packages/plotly/express/_core.py", line 1210, in process_args_into_dataframe raise ValueError(err_msg) ValueError: Value of 'names' is not the name of a column in 'data_frame'. Expected one of ['dep_age', 'count'] but received: index To use the index, pass it in directly as df.index.

^^ error is the same for padres, confusing because requirements.txt should be pinned...

JamesKunstle commented 8 months ago

@cdolfi assigned to you just so you see it, not for you to fix it

sgoggins commented 8 months ago

@JamesKunstle : I am getting the same issue at https://metrix.chaoss.io

The issue looks to me like its pythonic :

app-server-1       | ValueError: Value of 'names' is not the name of a column in 'data_frame'. Expected one of ['dep_age', 'count'] but received: index
app-server-1       |  To use the index, pass it in directly as `df.index`.
worker-callback-3  | [2024-03-12 23:54:16,254: INFO/MainProcess] Task long_callback_10bbaf4b32a7bdb8429745d161fb00e5e27b0dc0[9de34a60-8baf-4e5d-92d6-515bf1fe42aa] received
sgoggins commented 8 months ago

Package Version Updates comes up empty, which you probably already noticed. Pretty sure this is a Pandas thing in 8Knot.

sgoggins commented 8 months ago

(I also verified the same issue running locally against both ai.chaoss.io and projectbadge.chaoss.io where the smaller database lives. )

JamesKunstle commented 8 months ago

@sgoggins Yeah I have the same conclusion. This is a bug on our end. I was curious if there was an obvious table problem.