ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

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


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] :

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/rosdep-0.9.3-py2.7.egg/rosdep2/", 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/", 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/", 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/", 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/", 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/", 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/", 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/", 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/", 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!


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:
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
ERROR: unable to process source []:

Failed ...
edit retag flag offensive close merge delete


Where does it claim roscd goes to ~/fuerte_workspace/sandbox? This tutorial says (correctly) that it goes to $ROS_WORKSPACE:

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

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


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

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

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
sudo rosdep init
sudo rosdep update


edit flag offensive delete link more

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

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] :

Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/rosdep2/", line 111, in rosdep_main exit_code = _rosdep_main(args) File "/usr/lib/pymodules/python2.7/rosdep2/", line 232, in _rosdep_main return _package_args_handler(command, parser, options, args) File "/usr/lib/pymodules/python2.7/rosdep2/", line 255, in _package_args_handler lookup = _get_default_RosdepLookup(options) File "/usr/lib/pymodules/python2.7/rosdep2/", line 102, in _get_default_RosdepLookup verbose=options.verbose) File "/usr/lib/pymodules/python2.7/rosdep2/", 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/", 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

Your Answer

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

Add Answer

Question Tools



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

Seen: 10,236 times

Last updated: Jan 04 '13