Ask Your Question
1

python import tf -> rosdep2.core.InvalidData osx-homebrew.yaml

asked 2016-03-17 22:33:38 -0500

lucasw gravatar image

updated 2016-03-18 17:05:08 -0500

William gravatar image

I've somehow messed up the ability to import tf:

(starting from a clean .bashrc)

$ source /opt/ros/jade/setup.bash
$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tf
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/ros/jade/lib/python2.7/dist-packages/tf/__init__.py", line 29, in <module>
    from listener import TransformListener, TransformerROS
  File "/opt/ros/jade/lib/python2.7/dist-packages/tf/listener.py", line 30, in <module>
    roslib.load_manifest(PKG)
  File "/opt/ros/jade/lib/python2.7/dist-packages/roslib/launcher.py", line 62, in load_manifest
    sys.path = _generate_python_path(package_name, _rospack) + sys.path
  File "/opt/ros/jade/lib/python2.7/dist-packages/roslib/launcher.py", line 93, in _generate_python_path
    m = rospack.get_manifest(pkg)
  File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 164, in get_manifest
    return self._load_manifest(name)
  File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 208, in _load_manifest
    retval = self._manifests[name] = parse_manifest_file(self.get_path(name), self._manifest_name, rospack=self)
  File "/usr/lib/python2.7/dist-packages/rospkg/manifest.py", line 393, in parse_manifest_file
    _static_rosdep_view = init_rospack_interface()
  File "/usr/lib/python2.7/dist-packages/rosdep2/rospack.py", line 58, in init_rospack_interface
    lookup = _get_default_RosdepLookup(Options())
  File "/usr/lib/python2.7/dist-packages/rosdep2/main.py", line 127, in _get_default_RosdepLookup
    verbose=options.verbose)
  File "/usr/lib/python2.7/dist-packages/rosdep2/sources_list.py", line 607, in create_default
    sources = load_cached_sources_list(sources_cache_dir=sources_cache_dir, verbose=verbose)
  File "/usr/lib/python2.7/dist-packages/rosdep2/sources_list.py", line 508, in load_cached_sources_list
    return parse_sources_data(cache_data, origin=cache_index, model=model)
  File "/usr/lib/python2.7/dist-packages/rosdep2/sources_list.py", line 366, in parse_sources_data
    raise InvalidData("line:\n\t%s\n%s"%(line, e), origin=origin)
rosdep2.core.InvalidData: line:
    yaml https://github.com/ros/rosdistro/raw/master/rosdep/osx-homebrew.yaml osx
unsupported pickle protocol: 4

I cleaned out my ~/.ros/rosdep and ran rosdep update on it, but no change.

Another user account on same system was able to import tf fine, but then I ran rosdep update in it and now it has the same error.

If I scp the sources.cache from another system that hasn't been rosdep updated I can make it work again.

Ubuntu 14.04.4, jade, rosdep 0.11.4-1.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2016-03-18 08:08:53 -0500

lucasw gravatar image

updated 2016-03-18 08:38:24 -0500

The 'import tf' was a distraction that delayed finding this issue which is about python 3 pickle incompatibility with python 2:

https://github.com/ros-infrastructure...

And my rosdep does have #!/usr/bin/python3 in it and is in /usr/local/bin (but on two other systems it just has a #!/usr/bin/python and is only in /usr/bin/rosdep, reports the same version). There is also a /usr/bin/rosdep but the local bin takes precedence.

This answer http://answers.ros.org/question/42818... shows how to remove the wrong rosdep:

sudo pip uninstall rosdep
Not uninstalling rosdep at /usr/lib/python2.7/dist-packages, owned by OS

Therefore it was installed by easy_install, and has to be removed by hand. There were a lot of ros files in /usr/local/bin (rosversion, roslocate, rosinstall, rosdistro, rosco), I'll remove all of them:

sudo rm /usr/local/bin/ros*
sudo rm /usr/local/bin/catkin*
sudo rm -rf /usr/local/lib/python3.4/dist-packages/ros*
sudo rm -rf /usr/local/lib/python3.4/dist-packages/catkin_pkg

I'm not sure where they came from, they were all dated December 2nd, and I must not have run rosdep update since then until yesterday.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2016-03-17 22:33:38 -0500

Seen: 409 times

Last updated: Mar 18 '16