Houndify: sample_wave.py error: "unsupported operand type(s) for %: 'bytes' and 'int'"
Houndify: sample_wave.py error: "unsupported operand type(s) for %: 'bytes' and 'int'"
下载了 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'
看起来这是Python SDK中的一个错误,但在最新版本0.3.1 (https://docs.houndify.com/sdks#python)中已修复。
下载了 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'
看起来这是Python SDK中的一个错误,但在最新版本0.3.1 (https://docs.houndify.com/sdks#python)中已修复。