Wonderful work setting up this repo! I am interesting in extracting both heart-rate and location information.
I was able to export all GPS based workouts to GPX. However, for the non-GPS based workouts like indoor cycling I get a more or less empty file, just containing a start date/time and a workout of type "None". This makes sense, as there is no position information.
However, if I try to export as CSV (or XSLX) instead, the script breaks the moment it encounters the first non-GPS workout, with the error at the bottom of this issue.
I have two questions:
(1) Is it possible to still export the heart-rate measurements for non-GPS workouts to e.g. CSV or XLSX?
(2) If this is not feasible, is there a way to have the script skip any non-GPS workouts when exporting as CSV/XLSX?
I hope my request is clear, but let me know if you have any questions.
PS. I make YouTube videos on www.youtube.com/thequantifiedscientist , and I'll make sure to link this repo in the description if I end up using it. Great work!
The error:
INFO:src.scraper:Downloaded /Volumes/DataAnalysisSSD/Projects/2017-07-15_trackingMyself/data/amazfit/amazfitGTS4/pythonExport/Workout--2022-11-10--09-50-24.xlsx Traceback (most recent call last): File "/Users/robterhorst/Mi-Fit-and-Zepp-workout-exporter/main.py", line 67, in <module> scraper.run() File "/Users/robterhorst/Mi-Fit-and-Zepp-workout-exporter/src/scraper.py", line 40, in run self.exporter.export(output_file_path, summary, points) File "/Users/robterhorst/Mi-Fit-and-Zepp-workout-exporter/src/exporters/geopandas_exporter.py", line 60, in export gdf = gdf[ File "/Users/robterhorst/opt/anaconda3/envs/miZeppExport/lib/python3.10/site-packages/geopandas/geodataframe.py", line 1412, in __getitem__ result = super().__getitem__(key) File "/Users/robterhorst/opt/anaconda3/envs/miZeppExport/lib/python3.10/site-packages/pandas/core/frame.py", line 3810, in __getitem__ indexer = self.columns._get_indexer_strict(key, "columns")[1] File "/Users/robterhorst/opt/anaconda3/envs/miZeppExport/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 6111, in _get_indexer_strict self._raise_if_missing(keyarr, indexer, axis_name) File "/Users/robterhorst/opt/anaconda3/envs/miZeppExport/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 6174, in _raise_if_missing raise KeyError(f"{not_found} not in index") KeyError: "['track_date', 'timestamp', 'latitude', 'longitude', 'altitude'] not in index"