[openstack-dev] [openstacksdk][nose] Namespace conflict?

Doug Hellmann doug at doughellmann.com
Thu Jan 7 14:42:24 UTC 2016


Excerpts from Qiming Teng's message of 2016-01-07 13:54:56 +0800:
> Hi,
> 
> We have been using python-openstacksdk for some time, so far so good.
> Just encountered a problem when running latest devstack environment.
> The error looks something like:
> 
> $ python testsdk.py
> Traceback (most recent call last):
>   File "testsdk.py", line 2, in <module>
>     from openstack import profile
> ImportError: cannot import name profile
> 
> After examining the /usr/lib/python2.7/site-packages directory, I found
> the package 'openstack.nose-plugin', which is using the 'openstack'
> namespace. I have no idea what this package is about, why it was
> installed and maybe I shouldn't care. The real problem is that this
> package is using the 'openstack' namespace. It has only one file:
> 
>   /usr/lib/python2.7/site-packages/openstack/nose_plugin.py
> 
> This is conflicting with openstacksdk, which was installed somewhere
> else. openstacksdk is also using this namespace.
> 
> Suggestions to solve this conflict?
> 
> Thanks in advance.
> 
> Regards,
>   Qiming 
> 

The openstack.nose-plugin is used by projects that run tests through
nose instead of testr. One of these must have its test requirements
installed globally for some reason.

$ grep openstack.nose */*requirements*.txt
designate-dashboard/test-requirements.txt:openstack.nose-plugin>=0.7
evoque-dashboard/test-requirements.txt:openstack.nose-plugin>=0.7
group-based-policy-ui/test-requirements.txt:openstack.nose_plugin>=0.7
horizon-cisco-ui/test-requirements.txt:openstack.nose-plugin>=0.7
horizon/test-requirements.txt:openstack.nose-plugin>=0.7
magnum-ui/test-requirements.txt:openstack.nose-plugin>=0.7
mistral-dashboard/test-requirements.txt:openstack.nose-plugin>=0.7
monasca-ui/test-requirements.txt:openstack.nose_plugin>=0.7
murano-dashboard/test-requirements.txt:openstack.nose-plugin>=0.7
python-zaqarclient/test-requirements.txt:openstack.nose-plugin>=0.7
requirements/global-requirements.txt:openstack.nose_plugin>=0.7
senlin-dashboard/test-requirements.txt:openstack.nose-plugin>=0.7
spanner/test-requirements.txt:openstack.nose-plugin>=0.7
swift3/test-requirements.txt:openstack.nose_plugin
trove/test-requirements.txt:openstack.nose-plugin>=0.7
tuskar-ui/test-requirements.txt:openstack.nose-plugin>=0.7

Doug



More information about the OpenStack-dev mailing list