TRACE nova AttributeError: 'module' object has no attribute 'packs' 解决办法

I got the following errors when I was deploying OpenStack with devstack.
2013-02-28 01:08:28 DEBUG nova.utils [-] backend <module ‘nova.db.sqlalchemy.migration‘ from ‘/opt/stack
/nova/nova/db/sqlalchemy/migration.pyc‘> from (pid=27011) __get_backend /opt/stack/nova/nova/utils.py:50
6
Command failed, please check log for more info
2013-02-28 01:09:15 CRITICAL nova [-] ‘module‘ object has no attribute ‘packs‘
2013-02-28 01:09:15 TRACE nova Traceback (most recent call last):
2013-02-28 01:09:15 TRACE nova File "/opt/stack/nova/bin/nova-manage", line 1404, in <module>
2013-02-28 01:09:15 TRACE nova main()
2013-02-28 01:09:15 TRACE nova File "/opt/stack/nova/bin/nova-manage", line 1392, in main
2013-02-28 01:09:15 TRACE nova rpc.cleanup()
2013-02-28 01:09:15 TRACE nova File "/opt/stack/nova/nova/openstack/common/rpc/__init__.py", line 203,
 in cleanup
2013-02-28 01:09:15 TRACE nova return _get_impl().cleanup()
2013-02-28 01:09:15 TRACE nova File "/opt/stack/nova/nova/openstack/common/rpc/__init__.py", line 264,
 in _get_impl
2013-02-28 01:09:15 TRACE nova _RPCIMPL = importutils.import_module(cfg.CONF.rpc_backend)
2013-02-28 01:09:15 TRACE nova File "/opt/stack/nova/nova/openstack/common/importutils.py", line 58, i
n import_module
2013-02-28 01:09:15 TRACE nova __import__(import_str)
2013-02-28 01:09:15 TRACE nova File "/opt/stack/nova/nova/openstack/common/rpc/impl_kombu.py", line 30
, in <module>
2013-02-28 01:09:15 TRACE nova import kombu.messaging
2013-02-28 01:09:15 TRACE nova File "/usr/lib/python2.7/site-packages/kombu/messaging.py", line 15, in
 <module>
2013-02-28 01:09:15 TRACE nova from kombu.serialization import encode
2013-02-28 01:09:15 TRACE nova File "/usr/lib/python2.7/site-packages/kombu/serialization.py", line 30
0, in <module>
2013-02-28 01:09:15 TRACE nova register_msgpack()
2013-02-28 01:09:15 TRACE nova File "/usr/lib/python2.7/site-packages/kombu/serialization.py", line 28
2, in register_msgpack
2013-02-28 01:09:15 TRACE nova registry.register(‘msgpack‘, msgpack.packs, msgpack.unpacks,
2013-02-28 01:09:15 TRACE nova AttributeError: ‘module‘ object has no attribute ‘packs‘
2013-02-28 01:09:15 TRACE nova
++ failed
++ local r=1
+++ jobs -p
++ kill
++ set +o xtrace
解决办法:

1, yun -y install msgpack-python

2,modif vim /usr/lib/python2.6/site-packages/kombu-1.1.3-py2.6.egg/kombu/serialization.py

    278 def register_msgpack():
    279 """See http://msgpack.sourceforge.net/"""
    280 try:
    281 import msgpack
    282 #registry.register(‘msgpack‘, msgpack.packs, msgpack.unpacks,#修改msgpack.pack
    283 registry.register(‘msgpack‘, msgpack.pack, msgpack.unpack,
    284 content_type=‘application/x-msgpack‘,
    285 content_encoding=‘binary‘)
    286 except ImportError:
    287
    288 def not_available(*args, **kwargs):
    289 """In case a client receives a msgpack message, but yaml
    290 isn‘t installed."""
    291 raise SerializerNotInstalled(
    292 "No decoder installed for msgpack. "
    293 "Install the msgpack library")
    294 registry.register(‘msgpack‘, None, not_available,
    295 ‘application/x-msgpack‘)

TRACE nova AttributeError: 'module' object has no attribute 'packs' 解决办法

时间: 2024-08-25 18:48:42

TRACE nova AttributeError: 'module' object has no attribute 'packs' 解决办法的相关文章

Python错误:AttributeError: &#39;generator&#39; object has no attribute &#39;next&#39;解决办法

今天在学习生成器对象(generation object)运行以下代码时,遇到了一个错误: #定义生成器函数def liebiao(): for x in range(10): yield x#函数调用g = liebiao() #打印元素print(g.next())D:\>python test.pyTraceback (most recent call last): File "test.py", line 10, in <module> print(g.nex

Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法

最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attribute 'xxx'".这其实是.pyc文件存在问题. 问题定位: 查看import库的源文件,发现源文件存在且没有错误,同时存在源文件的.pyc文件 问题解决方法: 1. 命名py脚本时,不要与python预留字,模块名等相同 2. 删除该库的.pyc文件(因为py脚本每次运行时均会生成.pyc文件

Faq_flask : AttributeError: ‘module’ object has no attribute ‘autoescape’

原文地址: http://www.suzf.net/thread-0613-153.html 转载须注明原始出处 前些天从 "spider_net" 上找了一篇文章 , 大致就是利用 highcharts + flask + mysql 构建的一个简单的监控系统 ,经过几番挣扎终于还是给捣持出来了 , 现在总结一下 , 分享给大家 .   o_O 部分报错信息: * Detected change in 'flask_web.py', reloading* Restarting wit

AttributeError: &#39;module&#39; object has no attribute &#39;dumps&#39;

报错: [[email protected] ~]# ./json.py DATA: [{'a': 'A', 'c': 3.0, 'b': (2, 4)}] Traceback (most recent call last): File "./json.py", line 4, in <module> import json File "/root/json.py", line 8, in <module> data_string = jso

[Python]attributeError:&#39;module&#39; object has no attribute &#39;dump&#39;

[问题] [代码] 文件名:pickle.py # coding=utf-8 #持久存储 import pickle #b 以二进制的模式打开文件 with open('mydata.pickle','wb') as mysavedata: #用dump保存数据 pickle.dump([1,2,'three'],mysavedata) #b 以二进制的模式打开文件 with open('mydata.pickle','rb') as myreaddata: #使用load恢复数据 list =

service_identity 模块 AttributeError: &#39;module&#39; object has no attribute &#39;Any&#39;

安装scrapy之后,开始第一步创建scrapy的工程,之后提示一个userwarning:提示我service_identity没有安装,我通过pip install service_identity安装之后,重新创建一个scrapy的爬虫工程有提示以下的错误. Traceback (most recent call last): File "/usr/local/bin/scrapy", line 4, in execute() File "/usr/local/lib/

os.uname() AttributeError: &#39;module&#39; object has no attribute &#39;uname&#39;

os.uname() Returns information identifying the current operating system. The return value is an object with five attributes: sysname - operating system name nodename - name of machine on network (implementation-defined) release - operating system rel

AttributeError: &#39;module&#39; object has no attribute &#39;Thread&#39;

$ python thread.py starting at: 2015-08-05 00:24:24Traceback (most recent call last):  File "thread.py", line 28, in <module>    main()  File "thread.py", line 16, in main    th = threading.Thread(target= test,args= (i,2))Attribu

AttributeError: &#39;module&#39; object has no attribute &#39;handlers&#39;--Python子模块导入问题

想使用python的logging模块记录日志,并使用RotatingFileHandler来处理日志以便于在日志文件超过指定的大小后会重新生成新的日志文件. 基本代码如下: import logging logger = logging.getLogger('mylogger') logger.setLevel(logging.INFO) fh=logging.handlers.RotatingFileHandler('/tmp/test.log', mode = 'a', maxBytes=