Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] statistics visualize : KeyError: 'account_id'のエラーを修正 #1072

Closed
wants to merge 3 commits into from

Conversation

yuji38kwmt
Copy link
Collaborator

WARNING  : 2023-06-22 08:00:31,424 : annofabcli.statistics.visualize_statistics : project_id='0202ce8b-3d26-4573-8692-77d48cb0b82a'であるプロジェクトでのファイル出力に失敗しました。
Traceback (most recent call last):
  File "/home/kcitde/.cache/pypoetry/virtualenvs/kcitde-annotation-to-slack-OBHEOexS-py3.11/lib/python3.11/site-packages/annofabcli/statistics/visualize_statistics.py", line 91, in wrapped
    return function(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kcitde/.cache/pypoetry/virtualenvs/kcitde-annotation-to-slack-OBHEOexS-py3.11/lib/python3.11/site-packages/annofabcli/statistics/visualize_statistics.py", line 132, in write_user_performance
    task_worktime_obj = TaskWorktimeByPhaseUser.from_df(annotation_count_ratio_df, df_user, self.project_id)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kcitde/.cache/pypoetry/virtualenvs/kcitde-annotation-to-slack-OBHEOexS-py3.11/lib/python3.11/site-packages/annofabcli/statistics/visualization/dataframe/task.py", line 351, in from_df
    df = df_worktime_ratio.merge(df_user, on="account_id", how="left")
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kcitde/.cache/pypoetry/virtualenvs/kcitde-annotation-to-slack-OBHEOexS-py3.11/lib/python3.11/site-packages/pandas/core/frame.py", line 9843, in merge
    return merge(
           ^^^^^^
  File "/home/kcitde/.cache/pypoetry/virtualenvs/kcitde-annotation-to-slack-OBHEOexS-py3.11/lib/python3.11/site-packages/pandas/core/reshape/merge.py", line 148, in merge
    op = _MergeOperation(
         ^^^^^^^^^^^^^^^^
  File "/home/kcitde/.cache/pypoetry/virtualenvs/kcitde-annotation-to-slack-OBHEOexS-py3.11/lib/python3.11/site-packages/pandas/core/reshape/merge.py", line 737, in __init__
    ) = self._get_merge_keys()
        ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kcitde/.cache/pypoetry/virtualenvs/kcitde-annotation-to-slack-OBHEOexS-py3.11/lib/python3.11/site-packages/pandas/core/reshape/merge.py", line 1221, in _get_merge_keys
    left_keys.append(left._get_label_or_level_values(lk))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kcitde/.cache/pypoetry/virtualenvs/kcitde-annotation-to-slack-OBHEOexS-py3.11/lib/python3.11/site-packages/pandas/core/generic.py", line 1778, in _get_label_or_level_values
    raise KeyError(key)
KeyError: 'account_id'

@yuji38kwmt yuji38kwmt changed the title statistics visualize : KeyError: 'account_id'のエラーを修正 [WIP] statistics visualize : KeyError: 'account_id'のエラーを修正 Oct 2, 2023
@yuji38kwmt
Copy link
Collaborator Author

#1153 で対応したのでクローズ

@yuji38kwmt yuji38kwmt closed this Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant