0
$\begingroup$

Rosanswers logo

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.


Originally posted by taraprasad73 on ROS Answers with karma: 13 on 2018-11-03

Post score: 1


Original comments

Comment by gvdhoorn on 2018-11-04:
Related / duplicate: #q234825.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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?


Originally posted by gvdhoorn with karma: 86574 on 2018-11-04

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by taraprasad73 on 2018-11-04:
python --version returns Python 3.6.5

Comment by taraprasad73 on 2018-11-04:
So, this issue is due to the conflict between Python versions. Can you suggest any workaround to this problem, until the fix is released?

Comment by gvdhoorn on 2018-11-04:
Make sure /usr/bin/env python returns a v2 Python interpreter.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.