mjuenema / python-TSIP

Python library for parsing and creating TSIP packets used for communicating with a Trimble GPS receiver.
BSD 2-Clause "Simplified" License
6 stars 6 forks source link

tsip.llapi.gps.read() problem #12

Closed mjuenema closed 8 years ago

mjuenema commented 8 years ago
tox -e py34
-> (result, consumed) = self._buffer_decode(data, self.errors, final)
(Pdb) 
ERROR

======================================================================
ERROR: test_llapi.TestGPS.test_next
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/python-TSIP/.tox/py34/lib/python3.4/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/python-TSIP/tests/test_llapi.py", line 82, in test_next
    packet = self.gps_.next()
  File "/python-TSIP/tsip/llapi.py", line 125, in next
    packet = self.read()
  File "/python-TSIP/tsip/llapi.py", line 107, in read
    b = self.conn.read(1)
  File "/python-TSIP/.tox/py34/lib/python3.4/codecs.py", line 319, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8f in position 1: invalid start byte
mjuenema commented 8 years ago
packet += chr(ord(b))       # Python 3 work-around