学习使用rabbitmq,遇到麻烦python3.3.2rabbitmq3.4.1pika-0.9.14pythonsend.pyTraceback(mostrecentcalllast):File"send.py",line3,in connection=pika.BlockingConnection(pika.ConnectionParameters(host='localhost'))File"/home/hawk/g/sqlalchemy/lib/python3.3/site-packages/pika/connection.py",line361,in__init__ifhostandself._validate_host(host):File"/home/hawk/g/sqlalchemy/lib/python3.3/site-packages/pika/connection.py",line207,in_validate_hostifnotisinstance(host,basestring):NameError:globalname'basestring'isnotdefined------------------------------------------------------------pythonreceive.pyTraceback(mostrecentcalllast):File"receive.py",line5,in host='localhost'))File"/home/hawk/g/sqlalchemy/lib/python3.3/site-packages/pika/connection.py",line361,in__init__ifhostandself._validate_host(host):File"/home/hawk/g/sqlalchemy/lib/python3.3/site-packages/pika/connection.py",line207,in_validate_hostifnotisinstance(host,basestring):NameError:globalname'basestring'isnotdefined这是什么情况?===========================Python3.3.2+(default,Feb282014,00:52:16)[GCC4.8.1]onlinuxType"help","copyright","credits"or"license"formoreinformation.>>>importpika>>>connection=pika.BlockingConnection(pika.ConnectionParameters(...host='localhost'))Traceback(mostrecentcalllast):File"",line2,in File"/home/hawk/g/f3/lib/python3.3/site-packages/pika/connection.py",line361,in__init__ifhostandself._validate_host(host):File"/home/hawk/g/f3/lib/python3.3/site-packages/pika/connection.py",line207,in_validate_hostifnotisinstance(host,basestring):NameError:globalname'basestring'isnotdefinedweb开发flask、sqlalchemy等等都是使用python3,总不至于再回到2.7吧?
郎朗坤
相关分类