Mario-F-F / GPXVelocityCalculation

1 stars 0 forks source link

Error in reading gpx files #2

Open magerlin opened 7 years ago

magerlin commented 7 years ago

I cannot make the plugin work - have tried several gpx files from 3 different sources. With all I get this error:

2017-01-06T08:38:03 1 Traceback (most recent call last): File "C:/Users/MAP/.qgis2/python/plugins\GPXVelocityCalculation\GPX_Velocity_Calculation.py", line 407, in run self.computeVelocity(self.dlg.txtInputFileName.text(), self.dlg.txtOutputFileName.text(), self.dlg.cbLoadLayer.isChecked(), self.dlg.sbSegmentsCompute.value()) File "C:/Users/MAP/.qgis2/python/plugins\GPXVelocityCalculation\GPX_Velocity_Calculation.py", line 327, in computeVelocity dateTime0 = datetime.strptime(time0, "%Y-%m-%dT%H:%M:%SZ") File "C:\OSGEO4~1\apps\Python27\lib_strptime.py", line 325, in _strptime (data_string, format)) ValueError: time data '2017-01-06T06:48:58.340Z' does not match format '%Y-%m-%dT%H:%M:%SZ'

One of the tested gpx files:
6._jan._2017_07.48.55.zip

magerlin commented 7 years ago

By changing the date format to: "%Y-%m-%dT%H:%M:%S.%fZ" everywhere in "GPX_Velocity_Calculation.py" and deleting ", w.errorMessage()" in line 271 I have made it work.

But I will then probably be missing some error messages.