Ask Your Question

wstool cannot import rosinstall

asked 2014-06-11 00:49:57 -0500

ahendrix gravatar image

On Ubuntu Precise, I get the following error when trying to run wstool up to create a new workspace:

$ wstool up
ERROR: Cannot find required rosinstall library version, check your installation (also of vcstools) is up-to-date. One frequent cause is that rosinstall 0.5 is still installed in /usr/local/lib.
cannot import name urlopen_netrc

I've checked, and I have the latest versions of the wstool, vcstools and rosinstall libraries:

$ dpkg -l python-wstool python-vcstool python-bloom python-rosinstall
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                Version             Description
ii  python-bloom        0.5.9-1             Bloom is a release automation tool.
ii  python-rosinstall   0.7.3-1             The installer for ROS
ii  python-vcstool      0.1.6-1             vcstool provides a command line tool to invoke vcs com
ii  python-wstool       0.1.3-1             workspace multi-SCM commands

If I try to import the rosinstall module in ipython, I get the following stacktrace:

In [1]: import rosinstall
ImportError                               Traceback (most recent call last)
/home/hendrix/junior/src/<ipython-input-1-c1a82de03eac> in <module>()
----> 1 import rosinstall

/usr/lib/pymodules/python2.7/rosinstall/ in <module>()
---> 33 import wstool.helpers

/usr/lib/pymodules/python2.7/wstool/ in <module>()
     35 import codecs
     36 import subprocess
---> 37 from wstool.config_elements import SetupConfigElement
     39 ROSINSTALL_FILENAME = ".rosinstall"

/usr/lib/pymodules/python2.7/wstool/ in <module>()
     41 from wstool.common import samefile, MultiProjectException
---> 42 from wstool.config_yaml import PathSpec
     43 from wstool.ui import Ui

/usr/lib/pymodules/python2.7/wstool/ in <module>()
     33 import os
     34 import yaml
---> 35 from vcstools.common import urlopen_netrc
     36 from wstool.common import MultiProjectException

ImportError: cannot import name urlopen_netrc

I'm pretty sure that I only have rosinstall installed from debs, and the paths listed in the stack trace agree. Any thoughts?

edit retag flag offensive close merge delete


That looks like a problem with vcstools, did you check to make sure it is up-to-date and that it is not installed from pip?

William gravatar image William  ( 2014-06-11 01:43:28 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-06-11 03:19:54 -0500

ahendrix gravatar image

Blech. I have a old version of vcstools installed in my home directory. Removing it fixed this.

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

1 follower


Asked: 2014-06-11 00:49:57 -0500

Seen: 1,071 times

Last updated: Jun 11 '14