Skip to content

AttributeError: 'module' object has no attribute 'epoll' #1161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ghost opened this issue Nov 1, 2015 · 2 comments
Closed

AttributeError: 'module' object has no attribute 'epoll' #1161

ghost opened this issue Nov 1, 2015 · 2 comments

Comments

@ghost
Copy link

ghost commented Nov 1, 2015

$ cat test_foo.py
import select

def test_epoll():
    e = select.epoll()
$ py.test -s -v teuthology/test/test_foo.py
================================================================================================ test session starts ================================================================================================
platform linux2 -- Python 2.7.6, pytest-2.8.2, py-1.4.30, pluggy-0.3.1 -- /home/loic/software/ceph/teuthology/virtualenv/bin/python
cachedir: .cache
rootdir: /home/loic/software/ceph/teuthology, inifile: pytest.ini
collected 1 items 

teuthology/test/test_foo.py::test_epoll FAILED

===================================================================================================== FAILURES ======================================================================================================
____________________________________________________________________________________________________ test_epoll _____________________________________________________________________________________________________

    def test_epoll():
>       e = select.epoll()
E       AttributeError: 'module' object has no attribute 'epoll'

teuthology/test/test_foo.py:4: AttributeError
============================================================================================= 1 failed in 0.01 seconds ==============================================================================================
$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import select
>>> select.epoll()

>>> 
@The-Compiler
Copy link
Member

Works fine here. What does print select.__file__ say in the failing test?

@ghost
Copy link
Author

ghost commented Nov 1, 2015

from gevent import monkey
monkey.patch_all(dns=False)

was run implicitly and caused the error, sorry for the noise

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant