scrapper / postrunner

Application to manage FIT files such as those produced by Garmin fitness devices
GNU General Public License v2.0
62 stars 14 forks source link

error lap_index #13

Closed davidwul closed 4 years ago

davidwul commented 6 years ago

I have an issue when importing a workout. this happens often when it's a multisport workout. But it used to import flawlessly. I tried on a blank database, here is the log:

INFO: Creating PostRunner data directory .pr-test
INFO: Creating HTML output directory .pr-test/html
INFO: Creating devices directory .pr-test/devices
INFO: Creating Old Fit directory .pr-test/old_fit_dir
INFO: Creating fit directory .pr-test/fit
ERROR: Record 2018-06-26 04:28:07 +0000 has smaller distance (4944.95) than an earlier record (4945.88).
ERROR: Record 2018-06-26 04:46:46 +0000 has smaller distance (5604.34) than an earlier record (5663.04).
WARN: Discarding 43 earlier records
ERROR: lap_index must be 1, not 0
ERROR: lap_index must be 1, not 0

here are my gems installed:

bigdecimal (default: 1.3.4)
bindata (2.3.0)
cmath (default: 1.0.0)
csv (default: 1.0.0)
date (default: 1.0.0)
dbm (default: 1.0.0)
did_you_mean (1.2.0)
etc (default: 1.0.0)
fcntl (default: 1.0.0)
fiddle (default: 1.0.0)
fileutils (default: 1.0.2)
fit4ruby (2.0.0)
gdbm (default: 2.0.0)
io-console (default: 0.4.6)
ipaddr (default: 1.2.0)
json (default: 2.1.0)
mini_portile2 (2.3.0)
minitest (5.10.3)
net-telnet (0.1.1)
nokogiri (1.8.2)
openssl (default: 2.1.0)
perobs (4.0.0)
postrunner (0.10.1)
power_assert (0.2.7)
psych (default: 3.0.2)
rake (12.3.1)
rdoc (default: 6.0.1)
scanf (default: 1.0.0)
sdbm (default: 1.0.0)
stringio (default: 0.0.1)
strscan (default: 1.0.0)
test-unit (3.2.5)
webrick (default: 1.4.2)
zlib (default: 1.0.0)

Thanks for any help, I can provide a fit file if needed or more info. David

scrapper commented 4 years ago

This is a logic error in the .fit file. Unfortunately, some devices have a buggy firmware that can't always write a proper fit file. Looks like some readers are more forgiving than PostRunner.