Problems with rosbag file containing the Russian letter.

asked 2016-07-08 02:02:14 -0600

Igor gravatar image

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/", line 168, in generate_dynamic
  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():

Is it possible to solve this problem without changing the ROS files?

edit retag flag offensive close merge delete


Hello Igor, I have the same problem now. Did you find a solution?

jojoba gravatar image jojoba  ( 2017-03-28 04:29:08 -0600 )edit

i have also the same problem with Chinese characters. Any solution ?

aks gravatar image aks  ( 2018-03-29 08:00:52 -0600 )edit

Temp solution is to comment out the following line in /opt/ros/(distr)/lib/python2.7/dist-packages/genpy/ _ tmp_file.file.write(full_text.encode())_ However, the solution is to remove all non ascii characters in the bag file.

jojoba gravatar image jojoba  ( 2018-06-22 06:55:41 -0600 )edit