GPX plotted on map, but statistics not calculated.

Asked by Josh Smith

Hi,

This is my first foray into both Python and GPX, so I don't really feel confident enough to figure out what's going wrong and file a bug report for it. Sorry.

I've installed the most recent version (0.4). When I open a GPX file, it's displayed perfectly on the map, but none of the statistics are displayed. I get the following error message:

Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/gpxviewer/ui.py", line 300, in onTrackAdded
    self.selectTrace(trace)
  File "/usr/local/lib/python2.6/dist-packages/gpxviewer/ui.py", line 347, in selectTrace
    distance = trace.get_distance()
  File "/usr/local/lib/python2.6/dist-packages/gpxviewer/gpx.py", line 151, in get_distance
    return self._get_cached_value("distance")
  File "/usr/local/lib/python2.6/dist-packages/gpxviewer/gpx.py", line 97, in _get_cached_value
    self._walk_points()
  File "/usr/local/lib/python2.6/dist-packages/gpxviewer/gpx.py", line 85, in _walk_points
    seconds += (pointp['time'] - segment['points'][0]['time']).seconds
TypeError: 'NoneType' object is unsubscriptable

I'd rather not upload the GPX file to Launchpad as it's got the exact location of my house in it, but I'd happily email it to you if you need it.

Thanks!

Josh

Question information

Language:
English Edit question
Status:
Solved
For:
GPX Viewer Edit question
Assignee:
No assignee Edit question
Solved by:
Andrew Gee
Solved:
Last query:
Last reply:
Revision history for this message
Andrew Gee (andrewgee) said :
#1

Hi Josh,

Feel free to email me the GPX file at <email address hidden>.

I keep finding differently formatted GPX files that seem to confuse GPX Viewer. I should be able to find a solution.

Thanks,
Andrew

Revision history for this message
Josh Smith (saxsux) said :
#2

Sure thing, Andrew - I've sent it.

Revision history for this message
Best Andrew Gee (andrewgee) said :
#3

I believe this problem is now solved in the git repository. Feel free to test it from here:
https://github.com/andrewgee/gpxviewer/tarball/752b6dd44bf6de6dc0cb9a45a5d829bbf3b4c7ca

Revision history for this message
Josh Smith (saxsux) said :
#4

Thanks Andrew Gee, that solved my question.