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

Tutorial Building a ROS Package: "Rosdep experienced an internal error: 'NoneType' object has no attribute 'copy'"

asked 2012-09-02 01:08:08 -0600

updated 2012-09-06 04:14:35 -0600

joq gravatar image

Hi!

I'm new to to ROS and Linux. I'm running ROS Fuerte on Ubuntu 12.04.

While going through the "BuildingPackages" tutorial I experienced a problem. After typing

rosdep install turtlesim

I get the error message:

ERROR: Rosdep experienced an internal error: 'NoneType' object has no attribute 'copy' Please go to the rosdep page [1] and file a bug report with the stack trace below. [1] : http://www.ros.org/wiki/rosdep

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/rosdep-0.9.3-py2.7.egg/rosdep2/main.py", line 111, in rosdep_main exit_code = _rosdep_main(args) File "/usr/local/lib/python2.7/dist-packages/rosdep-0.9.3-py2.7.egg/rosdep2/main.py", line 232, in _rosdep_main return _package_args_handler(command, parser, options, args) File "/usr/local/lib/python2.7/dist-packages/rosdep-0.9.3-py2.7.egg/rosdep2/main.py", line 255, in _package_args_handler lookup = _get_default_RosdepLookup(options) File "/usr/local/lib/python2.7/dist-packages/rosdep-0.9.3-py2.7.egg/rosdep2/main.py", line 103, in _get_default_RosdepLookup lookup = RosdepLookup.create_from_rospkg(sources_loader=sources_loader) File "/usr/local/lib/python2.7/dist-packages/rosdep-0.9.3-py2.7.egg/rosdep2/lookup.py", line 298, in create_from_rospkg lookup._load_all_views(loader=sources_loader) File "/usr/local/lib/python2.7/dist-packages/rosdep-0.9.3-py2.7.egg/rosdep2/lookup.py", line 426, in _load_all_views self._load_view_dependencies(resource_name, loader) File "/usr/local/lib/python2.7/dist-packages/rosdep-0.9.3-py2.7.egg/rosdep2/lookup.py", line 448, in _load_view_dependencies loader.load_view(view_key, db, verbose=self.verbose) File "/usr/local/lib/python2.7/dist-packages/rosdep-0.9.3-py2.7.egg/rosdep2/sources_list.py", line 505, in load_view rosdep_db.set_view_data(view_name, source.rosdep_data, view_dependencies, view_name) File "/usr/local/lib/python2.7/dist-packages/rosdep-0.9.3-py2.7.egg/rosdep2/model.py", line 89, in set_view_data self._rosdep_db[view_name] = RosdepDatabaseEntry(rosdep_data.copy(), view_dependencies, origin) AttributeError: 'NoneType' object has no attribute 'copy'

Maybe I somehow messed up my installation... I already did a reinstallation of Fuerte but the problem persists.

For I'm absolutely new to ROS and Ubuntu I have no clue how to solve or even further analyze the problem. I would very much appreciate any hints what to do at this point?

Thank you very much!

EDIT:

It's this part of the tutorial I have the mentioned problems with.

When I run

$ sudo rosdep init

I get

malte@ubuntu:~$ sudo rosdep init
[sudo] password for malte:  ERROR: default sources list file already exists:
    /etc/ros/rosdep/sources.list.d/20-default.list
Please delete if you wish to re-initialize

When I run

$ rosdep update

I get the error message

malte@ubuntu:~$ rosdep update
reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit https://github.com/ros/rosdistro/raw/master/rosdep/osx-homebrew.yaml
Hit https://github.com/ros/rosdistro/raw/master/rosdep/gentoo.yaml
Hit https://github.com/ros/rosdistro/raw/master/rosdep/base.yaml
Hit https://github.com/ros/rosdistro/raw/master/rosdep/python.yaml
ERROR: unable to process source [https://github.com/ros/rosdistro/raw/master/releases/fuerte.yaml]:

Failed ...
(more)
edit retag flag offensive close merge delete

Comments

Where does it claim roscd goes to ~/fuerte_workspace/sandbox? This tutorial says (correctly) that it goes to $ROS_WORKSPACE: http://www.ros.org/wiki/ROS/Tutorials/NavigatingTheFilesystem#Special_cases_for_roscd

joq gravatar image joq  ( 2012-09-05 08:21:19 -0600 )edit

I meant "1.2 Creating an new ROS package". Maybe I misunderstood but I interpreted "Now go into the ~/fuerte_workspace/sandbox directory" and "Alternatively, if you use Fuerte or later release, you can simply do: $ roscd" in the sense that both do the same, i.e. bring me to the sandbox directory.

mta gravatar image mta  ( 2012-09-05 22:54:27 -0600 )edit

5 Answers

Sort by ยป oldest newest most voted
6

answered 2012-09-03 12:33:25 -0600

joq gravatar image

updated 2012-09-04 13:09:53 -0600

Is this the tutorial you are running?

Did you run these commands?

$ sudo rosdep init
$ rosdep update

(Please respond by editing your question.)

UPDATE: you seem to have an old rosdep version installed somewhere. What does this show?

$ which rosdep

If it says something like /usr/local/bin/rosdep, then you need to uninstall the pip or easy_install version you had previously installed. That's simple with pip:

$ sudo pip uninstall rosdep

If you used easy_install, you'll have to find and remove all the relevant files by hand.

UPDATE #2: The uninstall was to remove the pip version in /usr/local/bin/rosdep. Then, it will use the correct, up-to-date /usr/bin/rosdep automatically installed via apt-get from the python-rosdep package. After uninstalling, "which rosdep" should show that one.

The pip version is deprecated, because it leads to exactly this kind of problem.

UPDATE #3: somehow your Debian APT database has gotten screwed up. That is not normal. Does the list of files printed here include /usr/bin/rosdep? Does that file exist?

$ dpkg -L python-rosdep

If not, try uninstalling python-rosdep and then reinstalling it again:

$ sudo apt-get remove python-rosdep
$ sudo apt-get install python-rosdep

UPDATE #4: you are not doing anything wrong, this is just a messy problem. I experienced it, too, when the pip version was replaced by the python-rosdep package.

I think the which command problem was caused by the shell. It keeps a hash table of commands it has found in the search path. When we deleted /usr/local/bin/rosdeps, it got confused.

I have seen this problem with those pyshared files not getting unpacked into /usr/lib/python2.7 properly, but I can't remember exactly how I resolved it.

It might help to reboot.

UPDATE #5: OK, make sure there is no old version anywhere in /usr/local:

$ find /usr/local -name rosdep2

If that finds anything at all, delete it. Then, try reinstalling the scripts again:

$ sudo apt-get remove python-rosdep
$ sudo apt-get install python-rosdep

UPDATE #6: I have no expectation that uninstalling everything would help. This is not Windows.

But, if you want to try that, this should remove all of ROS (note the single-quote characters):

$ sudo apt-get remove python-rosdep 'ros-fuerte-*'
edit flag offensive delete link more

Comments

one of my friends also got a similar error and we somehow managed to solve it. I think sometimes improper dependency lists for some stacks also cause this issue. I do not remember exactly how the error went away but I'll post if I remember. Am sure I dint do so many things mentioned here.

SivamPillai gravatar image SivamPillai  ( 2012-09-04 22:58:18 -0600 )edit
2

answered 2013-01-04 14:24:59 -0600

ocli gravatar image

There's a lot here so I don't know whether you've got your answer yet or not, but I don't think anyone has said these steps explicitly. The installation requires you to uninstall the pip version if you're running Ubuntu (and trying to install ros-groovy). So follow the installation guide normally up to this step

$ rosdep update

Then if you get the error again after reinstalling Ubuntu (which you said you're doing in your final edit, however that should not affect anything), call:

$ sudo pip uninstall rosdep

to remove the pip version, then try again with

$ sudo rm /etc/ros/rosdep/sources.list.d/20-default.list
$ sudo rosdep init
$ rosdep update

Hope that works

edit flag offensive delete link more
1

answered 2012-10-31 13:10:52 -0600

Simon Lynen gravatar image

Hi there,

try this to resolve the problem:

sudo pip uninstall rosdep
sudo apt-get remove --purge python-rosdep
sudo apt-get update && sudo apt-get install python-rosdep
bash
roscd
sudo rosdep init
sudo rosdep update

Simon

edit flag offensive delete link more
0

answered 2012-10-30 00:07:29 -0600

Wolf_Wolf gravatar image

updated 2012-11-02 01:10:10 -0600

I also get the same error!! Please provide a good solution for this problem!!Thanks!

Thanks, Simon, I should give you the exact error I have got, please check it:

~@~-VPCEJ2M1E:~/fuerte_workspace$ rosdep install rxtools/

ERROR: Rosdep experienced an internal error: [Errno 13] Permission denied: '/home/~/.ros/rosdep/sources.cache/index' Please go to the rosdep page [1] and file a bug report with the stack trace below. [1] : http://www.ros.org/wiki/rosdep

Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/rosdep2/main.py", line 111, in rosdep_main exit_code = _rosdep_main(args) File "/usr/lib/pymodules/python2.7/rosdep2/main.py", line 232, in _rosdep_main return _package_args_handler(command, parser, options, args) File "/usr/lib/pymodules/python2.7/rosdep2/main.py", line 255, in _package_args_handler lookup = _get_default_RosdepLookup(options) File "/usr/lib/pymodules/python2.7/rosdep2/main.py", line 102, in _get_default_RosdepLookup verbose=options.verbose) File "/usr/lib/pymodules/python2.7/rosdep2/sources_list.py", line 501, in create_default sources = load_cached_sources_list(sources_cache_dir=sources_cache_dir, verbose=verbose) File "/usr/lib/pymodules/python2.7/rosdep2/sources_list.py", line 419, in load_cached_sources_list with open(cache_index, 'r') as f: IOError: [Errno 13] Permission denied: '/home/~/.ros/rosdep/sources.cache/index'

When I try to "sudo" rosdep install rxtools, but I got this error, what is the meaning of it?

ERROR: Rosdep cannot find all required resources to answer your query Missing resource rxtools

But I am working under the fuerte_workspace..., and I have put the work path in the .bashrc file!!

edit flag offensive delete link more
0

answered 2012-10-29 09:04:47 -0600

I am getting the same error. Any other hints why this may be happening?

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2012-09-02 01:08:08 -0600

Seen: 10,922 times

Last updated: Jan 04 '13