-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: string pattern on a bytes-like object #193
Conversation
Wanted to use $ rosrun tf view_frames Listening to /tf for 5.0 seconds Done Listening b'dot - graphviz version 2.40.1 (20161225.0304)\n' Traceback (most recent call last): File "/opt/ros/melodic/lib/tf/view_frames", line 119, in <module> generate(dot_graph) File "/opt/ros/melodic/lib/tf/view_frames", line 89, in generate m = r.search(vstr) TypeError: cannot use a string pattern on a bytes-like object Simply adding the .decode('utf-8') to m = r.search(vstr.decode('utf-8')) fixed it.
saved my day! |
You may prefer tf2 since tf is now deprecated: But anyway, tf is still there, could anyone merge this, please? Maybe @tfoote? |
Very minor: that suggestion should be And +1 for targeting |
I opened a similar PR - this whole code block is useless nowadays, so the problem can be also resolved by removing the check: #222 |
@tfoote +1 <3 |
+1 @mikeferguson maybe? |
Replaced by #222 |
Thank you, you saved me |
how can i edit this file ? it refuses to be edited, it is secured ! |
Wanted to use
$ rosrun tf view_frames
Listening to /tf for 5.0 seconds
Done Listening
b'dot - graphviz version 2.40.1 (20161225.0304)\n'
Traceback (most recent call last):
File "/opt/ros/melodic/lib/tf/view_frames", line 119, in
generate(dot_graph)
File "/opt/ros/melodic/lib/tf/view_frames", line 89, in generate
m = r.search(vstr)
TypeError: cannot use a string pattern on a bytes-like object
Simply adding the .decode('utf-8') to m = r.search(vstr.decode('utf-8')) fixed it.