Describe the bug
cyber_channel echo "some topic" TypeError: cyber_PyChannelUtils_get_debugstring_by_msgtype_rawmsgdata() argument 1 must be str, not bytes
To Reproduce
Steps to reproduce the behavior:
Expected behavior
print message of the topic
Screenshots
Desktop (please complete the following information):
Me too
Describe the bug
cyber_channel echo "some topic" TypeError: cyber_PyChannelUtils_get_debugstring_by_msgtype_rawmsgdata() argument 1 must be str, not bytesTo Reproduce
Steps to reproduce the behavior:1. start a module successfully. 2. cyber_channel echo topic 3. See errorExpected behavior
print message of the topicScreenshots
Desktop (please complete the following information):
* OS: Ubuntu 18.04
Please change file /apollo/cyber/python/cyber_py3/cyber.py, line 365 to
return _CYBER.PyChannelUtils_get_debugstring_by_msgtype_rawmsgdata(str(str(msg_type)[2:-1]), rawmsgdata)
Did the suggestion above help solve your issue? We will close the issue for now. If you have any additional question, please feel free to open a new issue.
Based on @hackerliang's advice, I change file /apollo/cyber/python/cyber_py3/cyber.py, line 365 to
temp_byte = _CYBER.PyChannelUtils_get_debugstring_by_msgtype_rawmsgdata(msg_type.decode('utf-8'), rawmsgdata)
return temp_byte.decode('utf-8')
which turns the bytes string into a str type and solves this problem.
Most helpful comment
Please change file /apollo/cyber/python/cyber_py3/cyber.py, line 365 to