Houndify:sample_wave.py错误:“不支持的操作数类型为%:'bytes'和'int'”

时间:2016-08-07 05:38:00

标签: houndify

下载Houndify Python和C ++来尝试每个。    +获得了编译和运行良好的C ++示例。    + sample_text.py运行正常。

sample_wave.py和sample_stdin.py都失败并出现相同的错误:

$ ./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 个答案:

答案 0 :(得分:0)

看起来这是Python SDK中的一个错误,但它已在最新版本中修复,即0.3.1(https://docs.houndify.com/sdks#python)。