Houndify: sample_wave.py error: "unsupported operand type(s) for %: 'bytes' and 'int'"

161 Views Asked by At

Downloaded Houndify Python and C++ to try each. + Got the C++ sample to compile and run well. + sample_text.py runs fine.

sample_wave.py and sample_stdin.py both fail with the same error:

$ ./sample_wave.py '...my client ID here...' '...my client key here...' test_audio/whattimeisitindenver.wav

============== test_audio/whattimeisitindenver.wav ===================
Traceback (most recent call last):
  File "./sample_wave.py", line 72, in <module>
    client.start(MyListener())
  File "/home/system/catkin_ws/src/houndify/houndify_python3_sdk_0.3.0/houndify.py", line 179, in start
    self._send(audio_header)
  File "/home/system/catkin_ws/src/houndify/houndify_python3_sdk_0.3.0/houndify.py", line 288, in _send
    self.conn.send(b'%x\r\n' % len(msg))
TypeError: unsupported operand type(s) for %: 'bytes' and 'int'
1

There are 1 best solutions below

0
James On BEST ANSWER

It looks like this is a bug in the Python SDK, but it has been fixed in the latest version which is 0.3.1 (https://docs.houndify.com/sdks#python).