0
$\begingroup$

Rosanswers logo

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 to download target platform data for gbpdistro:  invalid repo spec
in gbpdistro data: You must update to a newer rosdep version by calling..
    sudo apt-get update && sudo apt-get install python-rosdep
(make sure to uninstall the pip version on Ubuntu) 
ERROR: unable to process source [https://github.com/ros/rosdistro/raw/master/releases/groovy.yaml]:
Failed to download target platform data for gbpdistro:  invalid repo spec in gbpdistro data: 
You must update to a newer rosdep version by calling..
  sudo apt-get update && sudo apt-get install python-rosdep
(make sure to uninstall the pip version on Ubuntu) 
updated cache in /home/malte/.ros/rosdep/sources.cache

As suggested by the error message I then ran

$ sudo apt-get update

which worked without errors. Running

$ sudo apt-get install python-rosdep

led to the message that the newest version of "python-rosdep" is already installed and that packages "libblas-dev" and "liblapack-dev" were automatically installed.

EDIT #2:

For

$ which rosdep

answered "/usr/local/bin/rosdep" I uninstalled rosdep as suggested below:

malte@ubuntu:~$ sudo pip uninstall rosdep [sudo] password for malte:  Uninstalling rosdep:   /usr/bin/rosdep /usr/bin/rosdep-gbp-brew   /usr/bin/rosdep-source   /usr/local/lib/python2.7/dist-packages/rosdep-0.9.3-py2.7.egg Proceed (y/n)? y   Successfully uninstalled rosdep

I though I then had to install the newest version:

$ sudo pip install -U rosdep

but afterwards

$ which rosdep

again aswered with "/usr/local/bin/rosdep"

Furthermore

$ rosdep install turtlesim

again led to the error as before:

Rosdep experienced an internal error: 'NoneType' object has no attribute 'copy'

Is there a way to get rid of the whole installation and start again with a new one? I already tried to deinstall Fuerte by

$ sudo apt-get remove ros-fuerte-ros

and reinstalled it but that did not change anything.

EDIT #3

joq, thank you very much for your patience! I'm a total noob...

Unfortunately, I'm still not able to solve the problem. After uninstalling rosdep "which rosdep" answers nothing - not even an error message:

malte@ubuntu:~$ sudo pip uninstall rosdep
[sudo] password for malte: 
Uninstalling rosdep:
  /usr/local/bin/rosdep
  /usr/local/bin/rosdep-gbp-brew
  /usr/local/bin/rosdep-source
  /usr/local/lib/python2.7/dist-packages/rosdep-0.9.7.egg-info
  /usr/local/lib/python2.7/dist-packages/rosdep2
Proceed (y/n)? y
  Successfully uninstalled rosdep
malte@ubuntu:~$ which rosdep
malte@ubuntu:~$ 

And the "rosdep" command is not found.

malte@ubuntu:~$ rosdep install turtlesim
rosdep: command not found

That's why I thought I have to reinstall it. Running

$ sudo apt-get install python-rosdep

I get the message that the newest version of python-rosdep is already installed (the message is in German so I don't post it here).

Any ideas? Thanks again!

EDIT #4

Strange things going on...

malte@ubuntu:~$ dpkg -L python-rosdep
/.
/usr
/usr/bin
/usr/bin/rosdep
/usr/bin/rosdep-source
/usr/bin/rosdep-gbp-brew
/usr/share
/usr/share/python-support
/usr/share/python-support/python-rosdep.public
/usr/share/pyshared
/usr/share/pyshared/rosdep-0.9.7.egg-info
/usr/share/pyshared/rosdep-0.9.7.egg-info/SOURCES.txt
/usr/share/pyshared/rosdep-0.9.7.egg-info/PKG-INFO
/usr/share/pyshared/rosdep-0.9.7.egg-info/requires.txt
/usr/share/pyshared/rosdep-0.9.7.egg-info/dependency_links.txt
/usr/share/pyshared/rosdep-0.9.7.egg-info/top_level.txt
/usr/share/pyshared/rosdep2
/usr/share/pyshared/rosdep2/installers.py
/usr/share/pyshared/rosdep2/dependency_graph.py
/usr/share/pyshared/rosdep2/rospkg_loader.py
/usr/share/pyshared/rosdep2/model.py
/usr/share/pyshared/rosdep2/core.py
/usr/share/pyshared/rosdep2/shell_utils.py
/usr/share/pyshared/rosdep2/rep3.py
/usr/share/pyshared/rosdep2/main.py
/usr/share/pyshared/rosdep2/lookup.py
/usr/share/pyshared/rosdep2/platforms
/usr/share/pyshared/rosdep2/platforms/osx.py
/usr/share/pyshared/rosdep2/platforms/gentoo.py
/usr/share/pyshared/rosdep2/platforms/arch.py
/usr/share/pyshared/rosdep2/platforms/cygwin.py
/usr/share/pyshared/rosdep2/platforms/redhat.py
/usr/share/pyshared/rosdep2/platforms/brewmaker.py
/usr/share/pyshared/rosdep2/platforms/debian.py
/usr/share/pyshared/rosdep2/platforms/opensuse.py
/usr/share/pyshared/rosdep2/platforms/pip.py
/usr/share/pyshared/rosdep2/platforms/freebsd.py
/usr/share/pyshared/rosdep2/platforms/source.py
/usr/share/pyshared/rosdep2/gbpdistro_support.py
/usr/share/pyshared/rosdep2/catkin_support.py
/usr/share/pyshared/rosdep2/loader.py
/usr/share/pyshared/rosdep2/__init__.py
/usr/share/pyshared/rosdep2/sources_list.py
/usr/share/doc
/usr/share/doc/python-rosdep
/usr/share/doc/python-rosdep/changelog.Debian.gz
malte@ubuntu:~$ which rosdep
malte@ubuntu:~$ rosdep install turtlesim
rosdep: command not found
malte@ubuntu:~$ 

obviously the list does contain /usr/bin/rosdep. Because "which rosdep" still said nothing I uninstalled and reinstalled python-rosdep again. Now at least "which rosdep" works:

malte@ubuntu:~$ which rosdep
/usr/bin/rosdep

But "rosdep install turtlesim" still doesn't work, the same error as from begin on:

malte@ubuntu:~$ rosdep install turtlesim

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/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 103, in _get_default_RosdepLookup
    lookup = RosdepLookup.create_from_rospkg(sources_loader=sources_loader)
  File "/usr/lib/pymodules/python2.7/rosdep2/lookup.py", line 299, in create_from_rospkg
    lookup._load_all_views(loader=sources_loader)
  File "/usr/lib/pymodules/python2.7/rosdep2/lookup.py", line 443, in _load_all_views
    self._load_view_dependencies(resource_name, loader)
  File "/usr/lib/pymodules/python2.7/rosdep2/lookup.py", line 465, in _load_view_dependencies
    loader.load_view(view_key, db, verbose=self.verbose)
  File "/usr/lib/pymodules/python2.7/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/lib/pymodules/python2.7/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'

Can I do wrong something very stupid???

To be honest, I would prefer to delete/uninstall as much as possible and start again form scratch. It's getting a little bit frustrating...

EDIT #5

Meanwhile I rebooted the computer several times - no positive effects on the current problem...

EDIT #6

find /usr/local -name rosdep2

Did not find anything

uninstalling and reinstalling python-rosdep did not solve the problem. When running

$ rosdep install turtlesim

the same error as before occurred:

ERROR: Rosdep experienced an internal error: 'NoneType' object has no attribute 'copy'

I don't want to steel your time. If you do not have any other ideas maybe you can just give me some hints how to get rid of all components installed during the installation of ROS? Is there any way to start a ROS installation from scratch again? I don't care if that would take an hour - solving this problem in a more elegant way will most likely take much longer (at least for me as a beginner)... It would be a little bit ridiculous to make a new Ubuntu installation just to get back to "tabula rasa", wouldn't it? Thanks again for your kind help!

EDIT #7

I uninstalled ROS rebooted the computer and reinstalled ROS following this. Afterwards I again ran through all steps of the tutorial till I reached "Building a ROS package". When typing

$ rosdep install turtlesim

the same error as many times before occured:

ERROR: Rosdep experienced an internal error: 'NoneType' object has no attribute 'copy'

To sum up: reinstallation did not help at all.

The only little irregularity I experienced during the first steps of the tutorial was that

$ roscd

did not bring me to ~/fuerte_workspace/sandbox (as claimed in the tutorial) but to ~/fuerte_workspace. I don't now why. I moved manually to ~/fuerte_workspace/sandbox and continued the tutorial.

Looks like the chance left for me is to get a new Ubuntu installation... Or has someone any other ideas?


Originally posted by mta on ROS Answers with karma: 41 on 2012-09-02

Post score: 4


Original comments

Comment by joq on 2012-09-05:
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

Comment by mta on 2012-09-05:
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.

$\endgroup$

3 Answers 3

0
$\begingroup$

Rosanswers logo

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-*'

Originally posted by joq with karma: 25443 on 2012-09-03

This answer was ACCEPTED on the original site

Post score: 6


Original comments

Comment by SivamPillai on 2012-09-04:
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.

$\endgroup$
0
$\begingroup$

Rosanswers logo

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


Originally posted by Simon Lynen with karma: 116 on 2012-10-31

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$
0
$\begingroup$

Rosanswers logo

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


Originally posted by ocli with karma: 215 on 2013-01-04

This answer was NOT ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

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