"ImportError: cannot import name types" when doing import oslo_config.cfg
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo.config |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I am using a very simple publisher code (which is being called from pecan rest api to put a message onto rabbitmq)
The Code looks like this
import oslo_config.cfg # -->> This line gives the error
import oslo_messaging as messaging
class AttisProducer:
log = logging.getLogger()
def getTransport(self):
configutil= ConfigurationUtil()
transport = messaging.
return transport
I get following error .
[Fri Feb 06 19:14:32.913660 2015] [:error] [pid 13029:tid 139988829513472] [remote 192.168.56.1:39606] from attis.common.
[Fri Feb 06 19:14:32.913723 2015] [:error] [pid 13029:tid 139988829513472] [remote 192.168.56.1:39606] File "/opt/stack/
[Fri Feb 06 19:14:32.914092 2015] [:error] [pid 13029:tid 139988829513472] [remote 192.168.56.1:39606] import oslo_config.cfg
[Fri Feb 06 19:14:32.914160 2015] [:error] [pid 13029:tid 139988829513472] [remote 192.168.56.1:39606] File "/opt/stack/
[Fri Feb 06 19:14:32.915013 2015] [:error] [pid 13029:tid 139988829513472] [remote 192.168.56.1:39606] from oslo.config import types
[Fri Feb 06 19:14:32.915098 2015] [:error] [pid 13029:tid 139988829513472] [remote 192.168.56.1:39606] ImportError: cannot import name types
dont know if i am doing anyting unusual
This is how my virtual env looks like (i am assuming this is due to some library incompatiblility )
root@management
total 2632
drwxr-xr-x 4 root root 4096 Feb 6 08:12 ..
-rw-r--r-- 1 root root 126 Feb 6 08:12 easy_install.py
drwxr-xr-x 10 root root 4096 Feb 6 08:12 pip
drwxr-xr-x 2 root root 4096 Feb 6 08:12 pip-6.0.6.dist-info
-rw-r--r-- 1 root root 315 Feb 6 08:12 easy_install.pyc
drwxr-xr-x 2 root root 4096 Feb 6 08:12 _markerlib
drwxr-xr-x 4 root root 4096 Feb 6 08:12 setuptools
drwxr-xr-x 2 root root 4096 Feb 6 08:12 setuptools-
drwxr-xr-x 4 root root 4096 Feb 6 08:13 requests-
-rw-r--r-- 1 root root 27915 Feb 6 08:13 prettytable-
drwxr-xr-x 4 root root 4096 Feb 6 08:13 SQLAlchemy-
drwxr-xr-x 4 root root 4096 Feb 6 08:13 pecan-0.
-rw-r--r-- 1 root root 15650 Feb 6 08:13 singledispatch-
-rw-r--r-- 1 root root 41100 Feb 6 08:13 logutils-
drwxr-xr-x 3 root root 4096 Feb 6 08:13 six-1.9.0-py2.7.egg
drwxr-xr-x 4 root root 4096 Feb 6 08:14 WebTest-
drwxr-xr-x 4 root root 4096 Feb 6 08:14 Mako-1.
-rw-r--r-- 1 root root 174638 Feb 6 08:14 WebOb-1.4-py2.7.egg
-rw-r--r-- 1 root root 170122 Feb 6 08:14 beautifulsoup4-
drwxr-xr-x 4 root root 4096 Feb 6 08:14 waitress-
drwxr-xr-x 4 root root 4096 Feb 6 08:14 MarkupSafe-
-rw-r--r-- 1 root root 116947 Feb 6 08:14 MySQL_python-
drwxr-xr-x 5 root root 4096 Feb 6 08:15 oslo.messaging-
drwxr-xr-x 5 root root 4096 Feb 6 08:15 futures-
drwxr-xr-x 5 root root 4096 Feb 6 08:15 oslo.middleware
drwxr-xr-x 4 root root 4096 Feb 6 08:15 kombu-3.
-rw-r--r-- 1 root root 99016 Feb 6 08:15 PyYAML-
drwxr-xr-x 5 root root 4096 Feb 6 08:15 eventlet-
drwxr-xr-x 4 root root 4096 Feb 6 08:15 stevedore-
drwxr-xr-x 5 root root 4096 Feb 6 08:16 oslo.i18n-
drwxr-xr-x 5 root root 4096 Feb 6 08:16 oslo.serializat
drwxr-xr-x 5 root root 4096 Feb 6 08:16 oslo.utils-
drwxr-xr-x 5 root root 4096 Feb 6 08:16 oslo.config-
drwxr-xr-x 4 root root 4096 Feb 6 08:16 pbr-0.10.
drwxr-xr-x 4 root root 4096 Feb 6 08:16 oslo.context-
drwxr-xr-x 4 root root 4096 Feb 6 08:17 Babel-1.3-py2.7.egg
drwxr-xr-x 4 root root 4096 Feb 6 08:17 amqp-1.
drwxr-xr-x 4 root root 4096 Feb 6 08:17 anyjson-
drwxr-xr-x 3 root root 4096 Feb 6 08:17 greenlet-
-rw-r--r-- 1 root root 13582 Feb 6 08:17 iso8601-
-rw-r--r-- 1 root root 29318 Feb 6 08:17 netifaces-
drwxr-xr-x 4 root root 4096 Feb 6 08:17 netaddr-
-rw-r--r-- 1 root root 477582 Feb 6 08:18 pytz-2014.
drwxr-xr-x 4 root root 4096 Feb 6 08:18 ansible-
-rw-r--r-- 1 root root 810488 Feb 6 08:18 pycrypto-
drwxr-xr-x 4 root root 4096 Feb 6 08:18 Jinja2-
-rw-r--r-- 1 root root 361086 Feb 6 08:18 paramiko-
-rw-r--r-- 1 root root 94674 Feb 6 08:18 ecdsa-0.
drwxr-xr-x 4 root root 4096 Feb 6 08:19 cliff-1.
drwxr-xr-x 3 root root 4096 Feb 6 08:19 pyparsing-
-rw-r--r-- 1 root root 42135 Feb 6 08:19 cmd2-0.
drwxr-xr-x 3 root root 4096 Feb 6 13:22 pkg_resources
drwxr-xr-x 4 root root 4096 Feb 6 18:55 attis_model-
drwxr-xr-x 4 root root 4096 Feb 6 18:55 attis_common-
drwxr-xr-x 4 root root 4096 Feb 6 18:55 attis_api-
drwxr-xr-x 4 root root 4096 Feb 6 18:55 attis_server-
-rw-r--r-- 1 root root 44 Feb 6 18:55 setuptools.pth
drwxr-xr-x 42 root root 4096 Feb 6 18:55 .
drwxr-xr-x 4 root root 4096 Feb 6 18:55 attis_cli-
-rw-r--r-- 1 root root 1624 Feb 6 18:55 easy-install.pth
Changed in oslo.config: | |
status: | New → Invalid |
Also the types module is there as shown below
ls /opt/stack/ venv/lib/ python2. 7/site- packages/ oslo.config- 1.6.0-py2. 7.egg/oslo/ config/
cfgfilter.py cfgfilter.pyc cfg.py cfg.pyc fixture.py fixture.pyc generator.py generator.pyc iniparser.py iniparser.pyc __init__.py __init__.pyc types.py types.pyc