ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Problem with rospack depends1

asked 2018-11-03 13:27:23 -0600

tarapt gravatar image

I am new to ROS and using ROS Melodic on Ubuntu 18.04. I was following the tutorials and got stuck with the command rospack depends1 beginner_tutorials

I am getting this message:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/rosdep2/rospack.py", line 59, in init_rospack_interface
    lookup = _get_default_RosdepLookup(Options())
  File "/usr/lib/python2.7/dist-packages/rosdep2/main.py", line 130, in _get_default_RosdepLookup
    verbose=options.verbose)
  File "/usr/lib/python2.7/dist-packages/rosdep2/sources_list.py", line 633, 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 533, 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 388, in parse_sources_data
    raise InvalidData('line:\n\t%s\n%s' % (line, e), origin=origin)
rosdep2.core.InvalidData: line:
    yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx
unsupported pickle protocol: 4
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/rosdep2/rospack.py", line 59, in init_rospack_interface
    lookup = _get_default_RosdepLookup(Options())
  File "/usr/lib/python2.7/dist-packages/rosdep2/main.py", line 130, in _get_default_RosdepLookup
    verbose=options.verbose)
  File "/usr/lib/python2.7/dist-packages/rosdep2/sources_list.py", line 633, 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 533, 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 388, in parse_sources_data
    raise InvalidData('line:\n\t%s\n%s' % (line, e), origin=origin)
rosdep2.core.InvalidData: line:
    yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx
unsupported pickle protocol: 4
[rospack] Error: could not call python function 'rosdep2.rospack.init_rospack_interface'

I have looked at the solutions of the same problem posted earlier, there were two of them but none of their solutions worked for me.

edit retag flag offensive close merge delete

Comments

Related / duplicate: #q234825.

gvdhoorn gravatar image gvdhoorn  ( 2018-11-04 01:52:59 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-11-04 01:52:08 -0600

gvdhoorn gravatar image

updated 2018-11-04 01:52:19 -0600

This would seem to be ros-infrastructure/rosdep#379 and ros/rospack#95.

A fix has been implemented (in ros-infrastructure/rosdep#633) and merged, but that may not have been released yet.

Just to confirm: what is the output of python --version on your system?

edit flag offensive delete link more

Comments

python --version returns Python 3.6.5

tarapt gravatar image tarapt  ( 2018-11-04 08:22:38 -0600 )edit

So, this issue is due to the conflict between Python versions. Can you suggest any workaround to this problem, until the fix is released?

tarapt gravatar image tarapt  ( 2018-11-04 08:27:08 -0600 )edit
1

Make sure /usr/bin/env python returns a v2 Python interpreter.

gvdhoorn gravatar image gvdhoorn  ( 2018-11-04 09:37:09 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2018-11-03 13:23:36 -0600

Seen: 389 times

Last updated: Nov 04 '18