我已经使用Kombu
了一段时间了 - 今天当我准备一台新机器进行部署时,我TypeError
正在import
从kombu
:
>>> import kombu
>>> from kombu import Connection, Exchange, Queue, Producer
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/site-packages/kombu/__init__.py", line 81, in __getattr__
module = __import__(object_origins[str(name)], None, None, [str(name)])
File "/usr/local/lib/python2.7/site-packages/kombu/connection.py", line 15, in <module>
from kombu import exceptions
File "/usr/local/lib/python2.7/site-packages/kombu/exceptions.py", line 6, in <module>
from amqp import ChannelError, ConnectionError, ResourceError
File "/usr/local/lib/python2.7/site-packages/amqp/__init__.py", line 48, in <module>
from .basic_message import Message # noqa
File "/usr/local/lib/python2.7/site-packages/amqp/basic_message.py", line 29, in <module>
from .serialization import GenericContent
File "/usr/local/lib/python2.7/site-packages/amqp/serialization.py", line 33, in <module>
from .exceptions import FrameSyntaxError
File "/usr/local/lib/python2.7/site-packages/amqp/exceptions.py", line 264, in <module>
str(_method_name)
TypeError: Struct() argument 1 must be string, not unicode