I am trying to install ROS unstable on my Mac and the rosinstall command
fails with a traceback:
Traceback (most recent call last):
File
"/opt/local/Library/Frameworks/Python.framework/Versions/Current/bin/rosinstall",
line 551, in <module>
sys.exit(not rosinstall_main(sys.argv))
File
"/opt/local/Library/Frameworks/Python.framework/Versions/Current/bin/rosinstall",
line 508, in rosinstall_main
result = insert_source_yaml(source_yaml, a, observed_paths,
aggregate_source_yaml)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/Current/bin/rosinstall",
line 385, in insert_source_yaml
if not element[k]:
TypeError: string indices must be integers, not str
Which after some digging I found out is an unhandled exception here in the
rosinstall.helpers.get_yaml_from_uri function:
def get_yaml_from_uri(uri):
# now that we've got a config uri and a path, let's move out.
u = urlparse.urlparse(uri)
f = 0
if u.scheme == '': # maybe it's a local file?
try:
f = open(uri, 'r')
except IOError, e:
print >> sys.stderr, "ahhhh error opening file: %s" % e
return None
else:
try:
f = urllib2.urlopen(uri)
except IOError, e:
print >> sys.stderr, "ahhhhh got an error from the interwebs: %s" % e
if not f:
print >> sys.stderr, "couldn't load config uri %s" % uri
return None
try:
y = yaml.load(f); #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< This
returns the string "Variant "base" does not exist in the unstable disro
file." rather than throwing an exception
except yaml.YAMLError, e:
print >> sys.stderr, "ahhhhhhhh, yaml parse error: %s" % e # long ahh
return None
return y
Which gets returned and manifested as the TypeError above.
So, the real problem is that the rosinstall url from
http://www.ros.org/wiki/unstable/Installation/Ubuntu/source and
http://www.ros.org/wiki/unstable/Installation/OSX,
https://code.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=unstable&variant=base&overlay=no,
returns the string "Variant "base" does not exist in the unstable disro
file." rather then yaml.
This is true of variants "ros" and "base", but "pr2" seems to return yaml, I
might try to install using it for now.
Is there a reason that unstable doesn't have "ros" and "base" or are things
just changing with unstable's variant layout atm?
Thanks,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
William Woodall
Graduate Software Engineering
Auburn University
w@auburn.edu
wjwwood@gmail.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~