firefly-cpp / sport-activities-features

A minimalistic toolbox for extracting features from sports activity files written in Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Read one GPX file produces division by zero

KoprivcLuka opened this issue · comments

When I mass imported a mass collection, exported from strava, a large ammount of them failed. It would appear, when parsing the file a point is somehow read twice but differently - picture provided bellow.

image

image

These different points are actually one the the XML

image

Thanks @KoprivcLuka for raising this issue.

I've checked the code and fixed it so that it still works even if two timestamps were somehow recorded with the same time.
Pull request #84 should fix this issue #83 !

@KoprivcLuka, please install the latest release.

The fix works, however i have to warn you, that it appears that used library gpxpy has trouble parsing some files.

image

@KoprivcLuka can you please upload the troubled GPX files so I can check them out.

L_Koprivc_2021_03_23_Brnica.zip

This is an example of an unparsable file which produces above error.

@alenrajsp, please check it out.

BrokenFiles.zip
I have found several more files which should be valid XML, exported from https://www.gpsvisualizer.com that seem to cause issues

@KoprivcLuka, @alenrajsp, any progress regarding this issue?

#120 PR should work with "https://l_koprivc_2021_03_23_brnica.zip/".

PR #121 adds tests for UTF-8 formatting fixed in PR #120. The tests are passing and will no longer happen in the future so this issue can be closed.