SamR1 / FitTrackee

Self-hosted outdoor activity tracker :bicyclist:
https://samr1.github.io/FitTrackee
GNU Affero General Public License v3.0
643 stars 38 forks source link

Prevent gpx parse error with zip import ( global import fail) #87

Open paf38 opened 2 years ago

paf38 commented 2 years ago

Hi,

I discovered than some of my gpx files aren't parsed by gpxpy and when zip import is choosen, global import fail.

Is it possible to add with try/catch in zip import method and list invalid files at the end of the import on fittrackee_client ?

sgofferj commented 1 year ago

Yeah, same here! I manually do a quick check over all files before I import them. Most often I have problems because the files don't contain any actual trackpoints (stopped recording before GPS lock) or they are not properly closed. My quick check is just deleting every file under 10k size and then runnning a tail -n2 over evey file so check if it's properly closed.

A big related problem is that fittrackee does not clean the import/unzip folders on failed import, so even after fixing erroneous files, the following import will also fail.