[Pkg-running-devel] Bug#727768: [Pytrainer-devel] Bug#727768: pytrainer: fails to import gpx files

Johannes Rohr jorohr at gmail.com
Sun Nov 3 09:50:15 UTC 2013


On Do, Okt 31, 2013 at 12:38:13 +0100, David García Granda wrote:
> Hi,
> 
> Pytrainer tries to validate every xml document before import and
> unfortunately xml 1.0 is not supported. Some questions trying to find
> root cause:
> 
> 1.- Does gpx file validate?
> 
> $ xmllint --noout --schema <schema_involved> <gpx_file>

Here is what happens:

[..]

2013-10-26_14-05-38.gpx:25889: element speed: Schemas validity error :
Element '{http://www.topografix.com/GPX/1/1}speed': This element is not
expected. Expected is ( ##other{http://www.topografix.com/GPX/1/1}* ).
2013-10-26_14-05-38.gpx:25896: element speed: Schemas validity error :
Element '{http://www.topografix.com/GPX/1/1}speed': This element is not
expected. Expected is ( ##other{http://www.topografix.com/GPX/1/1}* ).
2013-10-26_14-05-38.gpx fails to validate
jr at Erwin:~/ownCloud/osmtracker$ 

Obviously, the offending part is the "speed" element. Here is there
corresponding code in the xml file:

                        <trkpt lat="52.39175298" lon="13.13240081">
                                <ele>79.4000015258789</ele>
                                <time>2013-10-26T12:05:50Z</time>
                                <extensions>
                                        <speed>1.25</speed>
                                </extensions>
                        </trkpt>


Is this an incorrect whay of recording the speed?

Here is the header of the GPX file:

<?xml version="1.0" encoding="UTF-8" ?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" version="1.1"
creator="OSMTracker for Android™ -
http://osmtracker-android.googlecode.com/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation
="http://www.topografix.com/GPX/1/1
http://www.topografix.com/GPX/1/1/gpx.xsd ">


> 
> 2.- Did you Johannes change some packages on your local installation
> in last weeks?

I am using Debian Testing, so the system keeps changing all the time.

> 
> 3.- Are you aware of any changes of mentioned app (OSM Tracker)?. I
> know few people who got invalid exports from Garmin Connect some days
> ago :|

According to the changelog at
https://code.google.com/p/osmtracker-android/wiki/Changelog

v0.6.5: Export speed information in GPX thanks to andyhelp. 

Is this "extensions" element something that could be accommodated by
pytrainer, or is it invalid xml?


Thanks,

Johannes

> 
> Best regards,
> 
> David
> 
> PS: sorry for top posting, not really familiar with Debian's bug tracking system
> 
> 2013/10/26 Johannes Rohr <jorohr at gmail.com>:
> > Package: pytrainer
> > Version: 1.10.1-2
> > Severity: normal
> >
> > As of today, pytrainer no longer imports gpx files generated by OSM Tracker. (I last tried a couple of weeks back, it always used to work flawlessly.)
> >
> >
> > Here is what I see on the console:
> >
> > running pytrainer from egg installation
> > data_path: /usr/share/pytrainer/
> > gettext_path: /usr/share/locale
> > site_path: /usr/lib/python2.7/site-packages
> > ERROR:root:Failed when retrieving Max Heartrate value: invalid literal for int() with base 10: ''
> > ERROR:root:Failed when retrieving Min Heartrate value: invalid literal for int() with base 10: ''
> > No bp log location saved, using default.
> > [000:000] Cpu: 6.23.10, x2, 2801Mhz, 3898MB
> > [000:000] Computer model: Not available
> > [000:000] Browser XEmbed support present: 1
> > [000:000] Browser toolkit is Gtk2.
> > [000:000] Using Gtk2 toolkit
> > No bp log location saved, using default.
> > [000:000] Cpu: 6.23.10, x2, 2801Mhz, 3898MB
> > [000:000] Computer model: Not available
> > [000:001] Warning(optionsfile.cc:47): Load: Could not open file, err=2
> > [000:001] No bp log location saved, using default.
> > [000:002] Cpu: 6.23.10, x2, 2801Mhz, 3898MB
> > [000:002] Computer model: Not available
> > [000:002] Browser XEmbed support present: 1
> > [000:002] Browser toolkit is Gtk2.
> > [000:002] Using Gtk2 toolkit
> > [000:001] Warning(optionsfile.cc:47): Load: Could not open file, err=2
> > [000:001] No bp log location saved, using default.
> > [000:001] Cpu: 6.23.10, x2, 2801Mhz, 3898MB
> > [000:001] Computer model: Not available
> > java version "1.7.0_25"
> > OpenJDK Runtime Environment (IcedTea 2.3.12) (7u25-2.3.12-4)
> > OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
> > ERROR:root:GPS Device import not yet implemented
> > ERROR:root:GPS Device import not yet implemented
> > UNIVERSAL->import is deprecated and will be removed in a future perl at /usr/share/pytrainer/plugins/garmin-fit/bin/Garmin/FIT.pm line 6.
> > ::#612@/usr/share/pytrainer/plugins/garmin-fit/bin/fit2tcx: main::Garmin::FIT::fetch_header#538@/usr/share/pytrainer/plugins/garmin-fit/bin/Garmin/FIT.pm: /media/jr/3732-3235/osmtracker/2013-10-26_14-05-38/2013-10-26_14-05-38.gpx: not a .FIT header (\x72\x73\x69\x6F ne '.FIT')
> > UNIVERSAL->import is deprecated and will be removed in a future perl at /usr/share/pytrainer/plugins/garmin-fit/bin/Garmin/FIT.pm line 6.
> > ::#612@/usr/share/pytrainer/plugins/garmin-fit/bin/fit2tcx: main::Garmin::FIT::fetch_header#538@/usr/share/pytrainer/plugins/garmin-fit/bin/Garmin/FIT.pm: /home/jr/ownCloud/osmtracker/2013-10-25_22-05-28.gpx: not a .FIT header (\x72\x73\x69\x6F ne '.FIT')
> > ERROR:root:GPS Device import not yet implemented
> > ERROR:root:GPS Device import not yet implemented
> > ERROR:root:GPS Device import not yet implemented
> > ERROR:root:GPS Device import not yet implemented
> > UNIVERSAL->import is deprecated and will be removed in a future perl at /usr/share/pytrainer/plugins/garmin-fit/bin/Garmin/FIT.pm line 6.
> > ::#612@/usr/share/pytrainer/plugins/garmin-fit/bin/fit2tcx: main::Garmin::FIT::fetch_header#538@/usr/share/pytrainer/plugins/garmin-fit/bin/Garmin/FIT.pm: /home/jr/ownCloud/osmtracker/2013-10-25_22-05-28.gpx: not a .FIT header (\x72\x73\x69\x6F ne '.FIT')
> >
> >
> > -- System Information:
> > Debian Release: jessie/sid
> >   APT prefers testing
> >   APT policy: (990, 'testing'), (500, 'unstable'), (450, 'experimental')
> > Architecture: amd64 (x86_64)
> > Foreign Architectures: i386
> >
> > Kernel: Linux 3.11-1-amd64 (SMP w/2 CPU cores)
> > Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
> > Shell: /bin/sh linked to /bin/dash
> >
> > Versions of packages pytrainer depends on:
> > ii  gpsbabel           1.4.3-1
> > ii  iceweasel          24.0-2
> > ii  python             2.7.5-5
> > ii  python-glade2      2.24.0-3+b1
> > ii  python-gtk2        2.24.0-3+b1
> > ii  python-libxml2     2.9.1+dfsg1-3
> > ii  python-lxml        3.2.0-1+b1
> > ii  python-matplotlib  1.1.1~rc2-1
> > ii  python-migrate     0.7.2-6
> > ii  python-numpy       1:1.7.1-3
> > ii  python-pysqlite2   2.6.3-3
> > ii  python-scipy       0.12.0-3
> > ii  python-soappy      0.12.0-4
> > ii  python-support     1.0.15
> > ii  python-webkit      1.1.8-3
> > ii  zenity             3.8.0-1
> >
> > pytrainer recommends no packages.
> >
> > pytrainer suggests no packages.
> >
> > -- no debconf information
> >
> >
> > ------------------------------------------------------------------------------
> > October Webinars: Code for Performance
> > Free Intel webinars can help you accelerate application performance.
> > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> > the latest Intel processors and coprocessors. See abstracts and register >
> > http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
> > _______________________________________________
> > Pytrainer-devel mailing list
> > Pytrainer-devel at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/pytrainer-devel
> 

-- 
infoe - Institut für Ökologie und Aktions-Ethnologie e.V.
Melchiorstr. 3, 50670 Köln, +49-221-739 28 71
http://www.infoe.de/ Fax: +49-221-922 97 60



More information about the Pkg-running-devel mailing list