Problems with rosbag file containing the Russian letter.
Hello, when you try to open rosbag file containing Russian letters I receive an error:
File "/opt/ros/jade/lib/python2.7/dist-packages/genpy/dynamic.py", line 168, in generate_dynamic
tmp_file.file.write(full_text.encode())
nicodeDecodeError: 'ascii' codec can't decode byte 0xd1 in position 5900: ordinal not in range(128)
The code is taken from the standard sampl to rosbag api:
import rosbag
bag = rosbag.Bag('mission_2016-03-01-11-44-34.bag')
cnt = 0
for topic, msg, t in bag.read_messages():
print(msg)
bag.close()
Is it possible to solve this problem without changing the ROS files?
Hello Igor, I have the same problem now. Did you find a solution?
i have also the same problem with Chinese characters. Any solution ?
Temp solution is to comment out the following line in /opt/ros/(distr)/lib/python2.7/dist-packages/genpy/dynamic.py. _ tmp_file.file.write(full_text.encode())_ However, the solution is to remove all non ascii characters in the bag file.