firefly-cpp / sport-activities-features

A minimalistic toolbox for extracting features from sports activity files written in Python
MIT License
17 stars 12 forks source link

Read one GPX file produces division by zero #83

Closed KoprivcLuka closed 1 year ago

KoprivcLuka commented 2 years ago

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

firefly-cpp commented 2 years ago

assigned to @alenrajsp

firefly-cpp commented 2 years ago

Thanks @KoprivcLuka for raising this issue.

alenrajsp commented 2 years ago

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 !

firefly-cpp commented 2 years ago

@KoprivcLuka, please install the latest release.

KoprivcLuka commented 2 years ago

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

image

alenrajsp commented 2 years ago

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

KoprivcLuka commented 2 years ago

L_Koprivc_2021_03_23_Brnica.zip

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

firefly-cpp commented 2 years ago

@alenrajsp, please check it out.

KoprivcLuka commented 2 years ago

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

firefly-cpp commented 1 year ago

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

alenrajsp commented 1 year ago

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

alenrajsp commented 1 year ago

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.