学习python使用rabbitmq,遇到麻烦
学习使用rabbitmq,遇到麻烦
- python3.3.2
- rabbitmq3.4.1
- pika-0.9.14
python send.py
Traceback (most recent call last):
File "send.py", line 3, in <module>
connection = pika.BlockingConnection(pika.ConnectionParameters(host='localhost'))
File "/home/hawk/g/sqlalchemy/lib/python3.3/site-packages/pika/connection.py", line 361, in __init__
if host and self._validate_host(host):
File "/home/hawk/g/sqlalchemy/lib/python3.3/site-packages/pika/connection.py", line 207, in _validate_host
if not isinstance(host, basestring):
NameError: global name 'basestring' is not defined
------------------------------------------------------------
python receive.py
Traceback (most recent call last):
File "receive.py", line 5, in <module>
host='localhost'))
File "/home/hawk/g/sqlalchemy/lib/python3.3/site-packages/pika/connection.py", line 361, in __init__
if host and self._validate_host(host):
File "/home/hawk/g/sqlalchemy/lib/python3.3/site-packages/pika/connection.py", line 207, in _validate_host
if not isinstance(host, basestring):
NameError: global name 'basestring' is not defined
这是什么情况?
草莓亮晶晶
10 years, 2 months ago