clearpathrobotics / robot_upstart

ROS package of helper functions related to bringing up roslaunch on system startup.
BSD 3-Clause "New" or "Revised" License
192 stars 94 forks source link

TypeError: unicode argument expected, got 'str' #99

Open ZDAHWYB opened 3 years ago

ZDAHWYB commented 3 years ago

ROS Melodic ubuntu 18.04 python 2.7 when I write rosrun robot_upstart install mbot_gazebo/launch/mbot_laser_nav_gazebo.launch then show the error: Traceback (most recent call last): File "/home/huanyu/catkin_ws/src/robot_upstart/scripts/install", line 32, in exit(main()) File "/home/huanyu/catkin_ws/src/robot_upstart/src/robot_upstart/install_script.py", line 123, in main j.install(Provider=provider) File "/home/huanyu/catkin_ws/src/robot_upstart/src/robot_upstart/job.py", line 162, in install installation_files = p.generate_install() File "/home/huanyu/catkin_ws/src/robot_upstart/src/robot_upstart/providers.py", line 179, in generate_install "content": self._fill_template("templates/systemd_job.conf.em"), "mode": 0o644} File "/home/huanyu/catkin_ws/src/robot_upstart/src/robot_upstart/providers.py", line 229, in _fill_template self.interpreter.file(f) File "/usr/lib/python2.7/dist-packages/em.py", line 2359, in file self.safe(scanner, done, locals) File "/usr/lib/python2.7/dist-packages/em.py", line 2401, in safe self.parse(scanner, locals) File "/usr/lib/python2.7/dist-packages/em.py", line 2421, in parse token.run(self, locals) File "/usr/lib/python2.7/dist-packages/em.py", line 1107, in run interpreter.write(self.data) File "/usr/lib/python2.7/dist-packages/em.py", line 2172, in write self.stream().write(data) File "/usr/lib/python2.7/dist-packages/em.py", line 538, in write self.filter.write(data) TypeError: unicode argument expected, got 'str'

melnarte commented 3 years ago

ROS melodic PRETTY_NAME="Raspbian GNU/Linux 10 (buster)" python 2.7 when I want to upstart my own package, I write

rosrun robot_upstart install qr_configuration/launch/configuration.launch

then show the error:

/lib/systemd/systemd Traceback (most recent call last): File "/path/robot_upstart/scripts/install", line 32, in exit(main()) File "/path/robot_upstart/src/robot_upstart/install_script.py", line 123, in main j.install(Provider=provider) File "/path/robot_upstart/src/robot_upstart/job.py", line 162, in install installation_files = p.generate_install() File "/path/robot_upstart/src/robot_upstart/providers.py", line 179, in generate_install "content": self._fill_template("templates/systemd_job.conf.em"), "mode": 0o644} File "/path/robot_upstart/src/robot_upstart/providers.py", line 229, in _fill_template self.interpreter.file(f) File "/usr/lib/python2.7/dist-packages/em.py", line 2359, in file self.safe(scanner, done, locals) File "/usr/lib/python2.7/dist-packages/em.py", line 2401, in safe self.parse(scanner, locals) File "/usr/lib/python2.7/dist-packages/em.py", line 2421, in parse token.run(self, locals) File "/usr/lib/python2.7/dist-packages/em.py", line 1107, in run interpreter.write(self.data) File "/usr/lib/python2.7/dist-packages/em.py", line 2172, in write self.stream().write(data) File "/usr/lib/python2.7/dist-packages/em.py", line 538, in write self.filter.write(data) TypeError: unicode argument expected, got 'str'