rosrun rqt_graph rqt_graph shows error NameError: name 'basestring' is not defined
I have started the tutorials and when I try to run rqt_graph it gives me a basestring error. Can someone please help me how to proceed?
I am using Ubuntu 16.04, and Kinetic distro.
Traceback (most recent call last):
File "/opt/ros/kinetic/lib/rqt_graph/rqt_graph", line 8, in <module>
sys.exit(main.main(sys.argv, standalone='rqt_graph.ros_graph.RosGraph'))
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_gui/main.py", line 59, in main
return super(Main, self).main(argv, standalone=standalone, plugin_argument_provider=plugin_argument_provider, plugin_manager_settings_prefix=str(hash(os.environ['ROS_PACKAGE_PATH'])))
File "/opt/ros/kinetic/lib/python2.7/dist-packages/qt_gui/main.py", line 349, in main
from .perspective_manager import PerspectiveManager
File "/opt/ros/kinetic/lib/python2.7/dist-packages/qt_gui/perspective_manager.py", line 44, in <module>
class PerspectiveManager(QObject):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/qt_gui/perspective_manager.py", line 48, in PerspectiveManager
perspective_changed_signal = Signal(basestring)
NameError: name 'basestring' is not defined
Is this what you were asking for?
EDIT:- I thought of proceeding for the time being, but I get same error on running rqt_console rqt_console; also in rqt_plot rqt_plot. Maybe the problem is in rqt package?
There is probably a multi-line stacktrace associated with that error. Could you include that in your post? Please edit your question and use the Preformatted Text button to format things properly (it's the one with
101010
on it).A quick google search suggests that this may be an incompatibility with trying to run python2 code in python3. Have you modified your system in some way to make python3 the default?
Yes you are right. I have installed anaconda for python, which sets python 3.5.2 as default. What should i do then?
No, the problem is (trying to) us(e)(ing) Python 3.x with code that is written for 2.x, as @ahendrix wrote in his comment.