OldhamMade / beanstalktop

A top-like UI for monitoring beanstalkd servers.
MIT License
3 stars 6 forks source link

AttributeError: 'module' object has no attribute 'poll' #6

Open svisser opened 10 years ago

svisser commented 10 years ago

The project doesn't seem to work on Mac OS X (and possibly others, as select.poll isn't supported on all operating systems):

  File "/Users/svisser/.virtualenvs/test/bin/beanstalktop.py", line 291, in run_beanstalktop
    return curses.wrapper(run_beanstalktop_window, options)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/curses/wrapper.py", line 43, in wrapper
    return func(stdscr, *args, **kwds)
  File "/Users/svisser/.virtualenvs/test/bin/beanstalktop.py", line 287, in run_beanstalktop_window
    ui.run()
  File "/Users/svisser/.virtualenvs/test/bin/beanstalktop.py", line 75, in run
    poll = select.poll()
AttributeError: 'module' object has no attribute 'poll'
OldhamMade commented 10 years ago

I've not tested with virtualenv – this project uses zc.buildout. You'll probably find that if you cd into the project and issue the following commands it will work:

python bootstrap.py
./bin/buildout
./bin/beanstalktop
svisser commented 10 years ago

That didn't work for me. At first I was missing libyaml:

build/temp.macosx-10.9-intel-2.7/check_libyaml.c:2:10: fatal error: 'yaml.h' file not found
#include <yaml.h>
         ^
1 error generated.

but in the following run (verbose) it didn't generate the desired file:

Installing 'zc.buildout >=1.7.1, <2dev', 'setuptools'.
We have the best distribution that satisfies 'zc.buildout>=1.7.1,<2dev'.
Picked: zc.buildout = 1.7.1
We have the best distribution that satisfies 'setuptools'.
Adding find link 'https://pypi.python.org/packages/source/c/certifi/certifi-1.0.1.tar.gz#md5=45f5cb94b8af9e1df0f9450a8f61b790' from setuptools 5.7
Adding find link 'https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.2.zip#md5=ae728f2f007185648d0c7a8679b361e2' from setuptools 5.7
Picked: setuptools = 5.7
Installing 'zc.recipe.egg'.
We have the best distribution that satisfies 'zc.recipe.egg<2dev'.
Picked: zc.recipe.egg = 1.3.2
Unused options for buildout: 'extra-paths'.
Updating dev.
Installing 'beanstalkc', 'PyYAML'.
We have the best distribution that satisfies 'beanstalkc'.
Picked: beanstalkc = 0.4.0
We have the best distribution that satisfies 'PyYAML'.
Picked: PyYAML = 3.11

The bin directory now only contains buildout and python (somehow). Based on the Python documentation it also seems select.poll is a standard library function so unless this installs a replacement for it, I don't see how it would work.