我有一个Python2.5中的应用程序,它监听beanstalk队列。到目前为止,它在我测试过的所有机器上都能正常工作,除了我新买的MacBookPro。在
在那台计算机上,当我试图运行它时,我得到了一个错误:Traceback (most recent call last):
File "jobs.py", line 181, in
Jobs().start()
File "jobs.py", line 154, in start
self.jobQueue = Queue()
File "src/utils/queue.py", line 16, in __init__
self.connection = serverconn.ServerConn(self.server, self.port)
File "src/beanstalk/serverconn.py", line 25, in __init__
self.poller = select.poll()
AttributeError: 'module' object has no attribute 'poll'
在服务器连接.py具有以下进口:
^{pr2}$
当我试图从命令行运行它时,它也失败了:Python 2.5.1 (r251:54863, Jul 23 2008, 11:00:16)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import select
>>> select.poll()
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'module' object has no attribute 'poll'
你知道会发生什么吗?在
PS:尽管我很有信心这不是源代码问题,但是如果您需要一些失败源代码的背景信息,可以在[http://pastie.org/399342](thispastie)上找到。在
更新:因为我得到的第一个答案推测选择投票()在Mac操作系统上是否受支持,但我也有一个iMac,操作系统版本完全相同,而且运行良好:2009-02-25 00:27:10,067 - Queue - DEBUG - Connecting to BeansTalk daemon @ localhost:11300