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

Some activities from the calendar just cannot be opened in activity view #105

Closed
martin-ueding opened this issue Mar 3, 2024 · 1 comment
Labels
component: web UI Controllers, templates and web server type: bug Something isn't working
Milestone

Comments

@martin-ueding
Copy link
Owner

I tried to open some activities from the calendar and it just didn't work:

2024-03-03 08:34:02 geo_activity_playground.webui.app ERROR Exception on /activity/3148244765964603892 [GET]
Traceback (most recent call last):
  File "/home/mu/.cache/pypoetry/virtualenvs/geo-activity-playground-cM-Vn1fX-py3.9/lib64/python3.9/site-packages/pandas/core/indexes/base.py", line 3805, in get_loc
    return self._engine.get_loc(casted_key)
  File "index.pyx", line 167, in pandas._libs.index.IndexEngine.get_loc
  File "index.pyx", line 196, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/hashtable_class_helper.pxi", line 2606, in pandas._libs.hashtable.Int64HashTable.get_item
  File "pandas/_libs/hashtable_class_helper.pxi", line 2630, in pandas._libs.hashtable.Int64HashTable.get_item
KeyError: 3145947796808355243

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/mu/.cache/pypoetry/virtualenvs/geo-activity-playground-cM-Vn1fX-py3.9/lib/python3.9/site-packages/flask/app.py", line 1463, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/mu/.cache/pypoetry/virtualenvs/geo-activity-playground-cM-Vn1fX-py3.9/lib/python3.9/site-packages/flask/app.py", line 872, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/mu/.cache/pypoetry/virtualenvs/geo-activity-playground-cM-Vn1fX-py3.9/lib/python3.9/site-packages/flask/app.py", line 870, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/mu/.cache/pypoetry/virtualenvs/geo-activity-playground-cM-Vn1fX-py3.9/lib/python3.9/site-packages/flask/app.py", line 855, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
  File "/home/mu/Projekte/geo-activity-playground/geo_activity_playground/webui/app.py", line 35, in activity
    "activity.html.j2", **activity_controller.render_activity(int(id))
  File "/home/mu/Projekte/geo-activity-playground/geo_activity_playground/webui/activity_controller.py", line 40, in render_activity
    similar_activites = {
  File "/home/mu/Projekte/geo-activity-playground/geo_activity_playground/webui/activity_controller.py", line 41, in <dictcomp>
    distance: [
  File "/home/mu/Projekte/geo-activity-playground/geo_activity_playground/webui/activity_controller.py", line 42, in <listcomp>
    self._repository.get_activity_by_id(activity_id)
  File "/home/mu/Projekte/geo-activity-playground/geo_activity_playground/core/activities.py", line 129, in get_activity_by_id
    activity = self.meta.loc[id]
  File "/home/mu/.cache/pypoetry/virtualenvs/geo-activity-playground-cM-Vn1fX-py3.9/lib64/python3.9/site-packages/pandas/core/indexing.py", line 1191, in __getitem__
    return self._getitem_axis(maybe_callable, axis=axis)
  File "/home/mu/.cache/pypoetry/virtualenvs/geo-activity-playground-cM-Vn1fX-py3.9/lib64/python3.9/site-packages/pandas/core/indexing.py", line 1431, in _getitem_axis
    return self._get_label(key, axis=axis)
  File "/home/mu/.cache/pypoetry/virtualenvs/geo-activity-playground-cM-Vn1fX-py3.9/lib64/python3.9/site-packages/pandas/core/indexing.py", line 1381, in _get_label
    return self.obj.xs(label, axis=axis)
  File "/home/mu/.cache/pypoetry/virtualenvs/geo-activity-playground-cM-Vn1fX-py3.9/lib64/python3.9/site-packages/pandas/core/generic.py", line 4298, in xs
    loc = index.get_loc(key)
  File "/home/mu/.cache/pypoetry/virtualenvs/geo-activity-playground-cM-Vn1fX-py3.9/lib64/python3.9/site-packages/pandas/core/indexes/base.py", line 3812, in get_loc
    raise KeyError(key) from err
KeyError: 3145947796808355243

I am not sure what the issue is, perhaps there is some integer overflow or something.

@martin-ueding martin-ueding added the type: bug Something isn't working label Mar 3, 2024
@martin-ueding martin-ueding changed the title Some activities from the calendar just cannot be loaded Some activities from the calendar just cannot be opened in activity view Mar 3, 2024
@martin-ueding martin-ueding added this to the Next milestone Mar 3, 2024
@martin-ueding
Copy link
Owner Author

This happens when there are similar activities that have vanished. Fixed in version > 0.20.0.

martin-ueding added a commit that referenced this issue Mar 3, 2024
@martin-ueding martin-ueding added the component: web UI Controllers, templates and web server label Jul 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: web UI Controllers, templates and web server type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant