Note that there are some explanatory texts on larger screens.

plurals
  1. POProblems on select module on Python 2.5
    primarykey
    data
    text
    <p>I have an application in Python 2.5 that listens to a beanstalk queue. It works fine on all machines I tested so far, except from my newly acquired MacBook Pro. </p> <p>On that computer, when I try to run it I get this error:</p> <pre><code>Traceback (most recent call last): File "jobs.py", line 181, in &lt;module&gt; 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' </code></pre> <p>The serverconn.py has the following imports:</p> <pre><code>import socket, select </code></pre> <p>And when I try to run it from command line, it fails as well:</p> <pre><code>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. &gt;&gt;&gt; import select &gt;&gt;&gt; select.poll() Traceback (most recent call last): File "&lt;stdin&gt;", line 1, in &lt;module&gt; AttributeError: 'module' object has no attribute 'poll' </code></pre> <p>Do you have any idea on what can be happening?</p> <p>PS: Even though I am pretty confident it's not a source problem, if you need some background on the source that's failing, it's available at [<a href="http://pastie.org/399342](this" rel="nofollow noreferrer">http://pastie.org/399342](this</a> pastie).</p> <p><em>Updated:</em> since the first answer I got speculates whether select.poll() is or not supported on Mac OS, but I have an iMac too and with the exact same OS version and it works fine:</p> <pre><code>2009-02-25 00:27:10,067 - Queue - DEBUG - Connecting to BeansTalk daemon @ localhost:11300 </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload