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

gemeinsame Aktivitäten #142

Closed
Hanfbaum opened this issue Aug 8, 2024 · 2 comments
Closed

gemeinsame Aktivitäten #142

Hanfbaum opened this issue Aug 8, 2024 · 2 comments
Labels
component: core Activity management, explorer tiles type: bug Something isn't working

Comments

@Hanfbaum
Copy link

Hanfbaum commented Aug 8, 2024

Ich glaube es gibt Probleme bei Aktivitäten, die gemeinsam stattgefunden haben.

E:\Martin\Playground_Strava>python -m geo_activity_playground serve
Import from Strava export: 0it [00:00, ?it/s]
Downloading Strava activities: 0it [00:00, ?it/s]
Enrich new activity data:   0%|                                                               | 0/2306 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "C:\Users\Hanfbaum\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\pandas\core\groupby\groupby.py", line 1770, in apply
    result = self._python_apply_general(f, self._selected_obj)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Hanfbaum\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\pandas\core\groupby\groupby.py", line 1819, in _python_apply_general
    values, mutated = self.grouper.apply_groupwise(f, data, self.axis)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Hanfbaum\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\pandas\core\groupby\ops.py", line 911, in apply_groupwise
    res = f(group)
          ^^^^^^^^
  File "C:\Users\Hanfbaum\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\pandas\core\groupby\groupby.py", line 1758, in f
    return func(g, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: _compute_moving_time.<locals>.moving_time() got an unexpected keyword argument 'include_groups'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\Hanfbaum\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\geo_activity_playground\__main__.py", line 116, in <module>
    main()
  File "C:\Users\Hanfbaum\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\geo_activity_playground\__main__.py", line 92, in main
    options.func(options)
  File "C:\Users\Hanfbaum\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\geo_activity_playground\__main__.py", line 66, in <lambda>
    *make_activity_repository(options.basedir, options.skip_strava),
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Hanfbaum\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\geo_activity_playground\__main__.py", line 110, in make_activity_repository
    scan_for_activities(repository, tile_visit_accessor, config, skip_strava)
  File "C:\Users\Hanfbaum\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\geo_activity_playground\webui\upload\controller.py", line 105, in scan_for_activities
    enrich_activities(config.get("kind", {}))
  File "C:\Users\Hanfbaum\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\geo_activity_playground\core\enrichment.py", line 72, in enrich_activities
    metadata.update(_get_metadata_from_timeseries(time_series))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Hanfbaum\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\geo_activity_playground\core\enrichment.py", line 93, in _get_metadata_from_timeseries
    metadata["moving_time"] = _compute_moving_time(timeseries)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Hanfbaum\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\geo_activity_playground\core\enrichment.py", line 110, in _compute_moving_time
    time_series.groupby("segment_id").apply(moving_time, include_groups=False).sum()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Hanfbaum\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\pandas\core\groupby\groupby.py", line 1780, in apply
    return self._python_apply_general(f, self._obj_with_exclusions)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Hanfbaum\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\pandas\core\groupby\groupby.py", line 1819, in _python_apply_general
    values, mutated = self.grouper.apply_groupwise(f, data, self.axis)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Hanfbaum\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\pandas\core\groupby\ops.py", line 911, in apply_groupwise
    res = f(group)
          ^^^^^^^^
  File "C:\Users\Hanfbaum\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\pandas\core\groupby\groupby.py", line 1758, in f
    return func(g, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: _compute_moving_time.<locals>.moving_time() got an unexpected keyword argument 'include_groups'

E:\Martin\Playground_Strava>pause
Drücken Sie eine beliebige Taste . . .
@martin-ueding
Copy link
Owner

Du meinst wegen dem include_groups? Das kommt von anderer Stelle, kann ich aber zuordnen.

@martin-ueding
Copy link
Owner

Das Problem ist, dass apply die Option include_groups erst ab Pandas 2.2.0 hat. Im Projekt ist aber als Version nur >= 2.0 vorgegeben. Ich gehe davon aus, dass bei dir die Version von Pandas älter ist. In der nächsten Version ist dann die Abhängigkeit zu Pandas explizit erhöht, womit sich das dann erledigen sollte.

@martin-ueding martin-ueding added type: bug Something isn't working component: core Activity management, explorer tiles labels Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: core Activity management, explorer tiles type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants