Package: python-gps
Version: 2.95-8

When I use python-gps to talk to gpsd with the stream method, I never
get a GPS fix. The reason is that gps.py cannot find its function
isotime() and therefore chokes on various GPS packets.

Here is an example. I use the following code:

---
from gps import *
session = gps(host = "gpshost")
session.stream(WATCH_ENABLE|WATCH_NEWSTYLE)

while True:
    try:
        session.next()
    except NameError:
        import sys
        print "ERROR:"
        print sys.exc_info()
        print session.response
---

The output is:

ERROR:
(<type 'exceptions.NameError'>, NameError("global name 'isotime' is not
defined",), <traceback object at 0xb7235694>)
GPSD,O=RMC 1319446769.750 0.005 50.910340 11.568682 ? 12.80 ? 49.0100
0.000 ? ? 102.40 ? 2

ERROR:
(<type 'exceptions.NameError'>, NameError("global name 'isotime' is not
defined",), <traceback object at 0xb7235914>)
GPSD,O=GGA 1319446769.750 0.005 50.910340 11.568682 212.10 12.80 8.00
49.0100 0.000 0.000 ? 102.40 ? 3

ERROR:
(<type 'exceptions.NameError'>, NameError("global name 'isotime' is not
defined",), <traceback object at 0xb72357d4>)
GPSD,O=GSA 1319446769.750 0.005 50.910340 11.568682 212.10 12.80 8.00
49.0100 0.000 0.000 ? 102.40 ? 3

ERROR:
(<type 'exceptions.NameError'>, NameError("global name 'isotime' is not
defined",), <traceback object at 0xb72357ac>)
GPSD,O=GLL 1319446769.750 0.005 50.910340 11.568682 212.10 12.80 8.00
49.0100 0.000 0.000 ? 102.40 ? 3

The fix is simple. Just change the beginning of
/usr/share/pyshared/gps/gps.py to:

<...>
import time
from client import *
from misc import *
<...>

The last line is currently missing in 2.95-8 but isotime() is contained
in misc.py.

<<attachment: dfeist.vcf>>

Reply via email to