tcgoetz / GarminDB

Download and parse data from Garmin Connect or a Garmin watch, FitBit CSV, and MS Health CSV files into and analyze data in Sqlite serverless databases with Jupyter notebooks.
GNU General Public License v2.0
1.21k stars 143 forks source link

Getting Failed to parse error on multiple activities #206

Closed myanshin closed 1 year ago

myanshin commented 1 year ago

Got multiple error messages while running for big part of activities: garmindb_cli.py --all --download --import --analyze --latest

Example: Failed to parse /home/maxim/HealthData/FitFiles/Activities/8284779428_ACTIVITY.fit: unsupported operand type(s) for &: 'list' and 'int' Failed to parse /home/maxim/HealthData/FitFiles/Activities/9855393971_ACTIVITY.fit: unsupported operand type(s) for &: 'list' and 'int' Failed to parse /home/maxim/HealthData/FitFiles/Activities/4722858425_ACTIVITY.fit: unsupported operand type(s) for &: 'list' and 'int'

bugreport.zip Ativities.zip

tcgoetz commented 1 year ago

Looks like you have a device or sensor:

manufacturer(<Manufacturer.zwift: 260> (260))

that is producing invalid data. It's passing an a list [255, 255, 255] where 255 is invalid value in some messages. I'm extending the parser to deal with it.

tcgoetz commented 1 year ago

Fix is in the develop branch. You can try it here or wait for the next release which should be soon.

tcgoetz commented 1 year ago

Fix is in 3.5.1.