pytr crashed with ValueError in getDateTime()

Bug #560226 reported by Glenn
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Pytrainer
Invalid
Unknown
pytrainer (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Binary package hint: pytrainer

Some GPX files are imported without time zone data, which causes pytrainer to throw an exception when the workout details are viewed. Workouts exported from Nokia SportsTracker (as GPX files which are then imported into pytrainer) do this.

If I modify /usr/lib/pymodules/python2.6/pytrainer/lib/date.py to explicitly set the timezone to UTC in these cases then it works OK.

ProblemType: Crash
DistroRelease: Ubuntu 10.04
Package: pytrainer 1.7.1-1.1ubuntu1
ProcVersionSignature: Ubuntu 2.6.32-19.28-generic-pae 2.6.32.10+drm33.1
Uname: Linux 2.6.32-19-generic-pae i686
NonfreeKernelModules: nvidia wl
Architecture: i386
Date: Sat Apr 10 20:35:58 2010
EcryptfsInUse: Yes
ExecutablePath: /usr/bin/pytr
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Beta i386 (20100406.1)
InterpreterPath: /usr/bin/python2.6
PackageArchitecture: all
ProcCmdline: python /usr/bin/pytr
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
PythonArgs: ['/usr/bin/pytr']
SourcePackage: pytrainer
Title: pytr crashed with ValueError in getDateTime()
UserGroups: adm admin audio cdrom dialout dip fuse lpadmin plugdev sambashare

Revision history for this message
Glenn (glenn-strong) wrote :
tags: removed: need-duplicate-check
Glenn (glenn-strong)
description: updated
visibility: private → public
tags: added: patch
Revision history for this message
Tom Ellis (tellis) wrote :

Hitting the same issue with SportsTracker gpx files

Revision history for this message
Tom Ellis (tellis) wrote :

Patch doesn't cleanly apply with pytrainer 1.7.1-1.1ubuntu1

Revision history for this message
Glenn (glenn-strong) wrote :

Hi Tom, are you applying the patch directly in /usr/lib/pymodules/python2.6/pytrainer/lib ? It should apply cleanly there. Perhaps I should have made it against the source package?

Revision history for this message
Tom Ellis (tellis) wrote :

Hi Glenn,

Apologies, taken me a while to catch up on this, I've tested this again and it works well for me!

Thanks

Changed in pytrainer (Ubuntu):
status: New → Confirmed
Revision history for this message
Christian Perrier (bubulle) wrote :

I just reported this as https://sourceforge.net/apps/trac/pytrainer/ticket/121 in upstream bug tracker

Revision history for this message
Christian Perrier (bubulle) wrote :

Upstream reports the issue is fixed in 1.8.0

Changed in pytrainer (Ubuntu):
importance: Undecided → High
Revision history for this message
Brian Murray (brian-murray) wrote :

And that fix is now in Oneiric.

Here's the relevant bit from date.py:

        timezone = dateTime.tzinfo
        if timezone is None: #got a naive time, so assume is local time
            #print 'Naive time'
            local_dateTime = dateTime.replace(tzinfo=tzlocal())

Changed in pytrainer (Ubuntu):
status: Confirmed → Fix Released
Changed in pytrainer:
status: Unknown → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.