We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am running rqt_graph on Noetic and noticed that storing the graph as a dot file throws an exception:
rqt_graph
Traceback (most recent call last): File "/opt/ros/noetic/lib/python3/dist-packages/rqt_graph/ros_graph.py", line 414, in _save_dot handle.write(self._current_dotcode) TypeError: write(self, Union[QByteArray, bytes, bytearray]): argument 1 has unexpected type 'str'
After searching around and finding these
It seems that on line 414 it seems binary should be passed to the write function
write
404 def _save_dot(self): 405 file_name, _ = QFileDialog.getSaveFileName( 406 self._widget, self.tr('Save as DOT'), 'rosgraph.dot', self.tr('DOT graph (*.dot)')) 407 if file_name is None or file_name == '': 408 return 409 410 handle = QFile(file_name) 411 if not handle.open(QIODevice.WriteOnly | QIODevice.Text): 412 return 413 414 handle.write(self._current_dotcode) 415 handle.close()
This is despite the fact that handle has an if statement before it. Do I understand this correctly? After adjusting the line to:
414 handle.write(f"{self._current_dotcode}".encode())
the problem goes away and I can successfully store the dot file.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am running
rqt_graph
on Noetic and noticed that storing the graph as a dot file throws an exception:After searching around and finding these
It seems that on line 414 it seems binary should be passed to the
write
functionThis is despite the fact that handle has an if statement before it. Do I understand this correctly?
After adjusting the line to:
the problem goes away and I can successfully store the dot file.
The text was updated successfully, but these errors were encountered: