Open JeromeSchmied opened 6 days ago
Please see PR #48.
looks good, how could I test that branch? (I have literally no python knowledge)
Try this to install direct from the GitHub branch:
python3 -m pip install git+https://github.com/hugovk/strava_py.git@fix-empty-trkseg
not quite there yet, running with from that branch with same examplle file shows this output:
$stravavis test_data
Processing data...
Cache filename: /tmp/stravavis/cached_activities_b41c762bc35cf07ff790ea2a0bf714bb.pkl
Loaded cached activities
Plotting facets...
Traceback (most recent call last):
File "/home/jero/code/python/strava_vis/.venv/bin/stravavis", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/jero/code/python/strava_vis/.venv/lib/python3.12/site-packages/stravavis/cli.py", line 128, in main
plot_facets(df, output_file=outfile)
File "/home/jero/code/python/strava_vis/.venv/lib/python3.12/site-packages/stravavis/plot_facets.py", line 20, in plot_facets
p = sns.FacetGrid(
^^^^^^^^^^^^^^
File "/home/jero/code/python/strava_vis/.venv/lib/python3.12/site-packages/seaborn/axisgrid.py", line 429, in __init__
nrow = int(np.ceil(len(col_names) / col_wrap))
~~~~~~~~~~~~~~~^~~~~~~~~~
ZeroDivisionError: division by zero
Thanks for testing, I've pushed an update, can you try again?
❯ stravavis tests/gpx/empty-trkseg.gpx
Processing data...
Cache filename: /var/folders/p6/lf2s1s5d4kb335g2n1td8z8c0000gn/T/stravavis/cached_activities_8f342e3343e3fbd635f5626cbd59b2a3.pkl
Cache not found
Processing ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
No data to plot
❯ stravavis tests/gpx/empty-trkseg.gpx
Processing data...
Cache filename: /var/folders/p6/lf2s1s5d4kb335g2n1td8z8c0000gn/T/stravavis/cached_activities_8f342e3343e3fbd635f5626cbd59b2a3.pkl
Loaded cached activities
No data to plot
description
if the gpx file doesn't contain any coordinates: the
trkseg
is empty, stravavis panics and quits, without actually saying which file is problematicalthough I do love this tool, it gave me quite a head-ache to figure out what the problem was
problem
take the following example, which is (as far as I can tell, according to
xmllint
) a valid gpx file:log
when the execution gets to this file, it kindly produces the following output