Christoffer Kjølbæk I have a blog, therefore I am…

30Dec/090

Pytrainer in Ubuntu 9.10, Karmic Koala

I have had problems with Pytrainer in both Ubuntu 8.04 and 8.10, but have manage to get it working. I did not use Pytrainer in 9.04, because I got a little tired of looking at graphs and was following a running program where it was not necessary.

If have been injured for some month now, but hoping to be ready for Copenhagen Marathon 2010, and would therefore like to examine my last marathon using Pytrainer. I therefore installed it, and hoped it would work out of the box - but no :)

Enabling the Garmin HR plugin, restarting Pytrainer and clicking "Import from Garmin" did nothing, not even a warning or error in the terminal. Looking at my old post from 8.10, I opened /usr/share/pytrainer/plugins/garmin-hr/main.py to see what was going on.

Pytrainer is using gpsbabel like gpsbabel -t -i garmin -f %s -o gtrnctr -F /tmp/file.gtrnctr, where %s is the device, usb:. But running

gpsbabel -t -i garmin -f usb: -o gtrnctr -F /tmp/file.gtrnctr

in a terminal give this result:

Claim interfaced failed: could not claim interface 0: Operation not permitted

It is therefore still required to make a udev rule for the device.

How to get it working
Make the rule file

sudo gedit /etc/udev/rules.d/51-garmin.rules

add the below and close:

SYSFS{idVendor}=="091e", SYSFS{idProduct}=="0003", MODE="666"

restart udev:

sudo /etc/init.d/udev restart

Now Pytrainer can start gpsbabel, and retrieve data from the watch, which unfortunately just leads to another problem:

Traceback (most recent call last):
File "/usr/lib/python2.6/dist-packages/pytrainer/main.py", line 166, in runPlugin
self.record.importFromGTRNCTR(gtrnctrFile)
File "/usr/lib/python2.6/dist-packages/pytrainer/record.py", line 410, in importFromGTRNCTR
listTracksGPS = xmlParser.shortFromGPS(gtrnctrFile, True)
File "/usr/lib/python2.6/dist-packages/pytrainer/lib/xmlUtils.py", line 127, in shortFromGPS
tree = xml.etree.cElementTree.parse(gtrnctrFile).getroot()
File "", line 45, in parse
File "
", line 32, in parse
SyntaxError: unbound prefix: line 13, column 8

According to this bug report, it is a problem between Pytrainer and gpsbabel 1.3.6. Luckily it is still possible to get gpsbabel 1.3.5 at http://packages.debian.org/lenny/i386/gpsbabel/download, which I downloaded and installed, and it worked with Pytrainer.

However, Pytrainer imports all data from today back to 24 May 2009, the date of the marathon, and stops without any error. It might be because this record has 43 laps, but I do not know. Anyway, it is quite useless if it is not possible to retrieve all data from the watch.

Kommentarer (0) Trackbacks (0)

Ingen kommentarer endnu.


Læg en kommentar


Ingen trackbacks endnu.