Skip to content

OS X 'module' object has no attribute 'POLLIN' #542

Closed

Description

@enkov
  • Which version of Ansible are you running?
ansible 2.7.7
  ansible python module location = /Library/Python/2.7/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 2.7.10 (default, Aug 17 2018, 19:45:58) [GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.0.42)]
  • Is your version of Ansible patched in any way?
    No
  • Are you running with any custom modules, or module_utils loaded?
    No
  • Have you tried the latest master version from Git?
    Tested on the latest release version 0.2.5
  • Do you have some idea of what the underlying problem may be?
    I get this error:
Traceback (most recent call last):
  File "/usr/local/bin/ansible-playbook", line 118, in <module>
    exit_code = cli.run()
  File "/Library/Python/2.7/site-packages/ansible/cli/playbook.py", line 122, in run
    results = pbex.run()
  File "/Library/Python/2.7/site-packages/ansible/executor/playbook_executor.py", line 156, in run
    result = self._tqm.run(play=play)
  File "/Library/Python/2.7/site-packages/ansible/executor/task_queue_manager.py", line 270, in run
    strategy = strategy_loader.get(new_play.strategy, self)
  File "/Library/Python/2.7/site-packages/ansible/plugins/loader.py", line 378, in get
    self._module_cache[path] = self._load_module_source(name, path)
  File "/Library/Python/2.7/site-packages/ansible/plugins/loader.py", line 357, in _load_module_source
    module = imp.load_source(full_name, path, module_file)
  File "/Users/petrenkov/WORK/mitogen-0.2.5/ansible_mitogen/plugins/strategy/mitogen_linear.py", line 56, in <module>
    import ansible_mitogen.strategy
  File "/Users/petrenkov/WORK/mitogen-0.2.5/ansible_mitogen/strategy.py", line 34, in <module>
    import mitogen.core
  File "/Users/petrenkov/WORK/mitogen-0.2.5/mitogen/core.py", line 1887, in <module>
    class Poller(object):
  File "/Users/petrenkov/WORK/mitogen-0.2.5/mitogen/core.py", line 1958, in Poller
    _readmask = select.POLLIN | select.POLLHUP
AttributeError: 'module' object has no attribute 'POLLIN'
  • Mention your host and target OS and versions
    Host OS: macOS Mojave 10.14.3
    Target OS: ubuntu 16.04
  • Mention your host and target Python versions
    host python version: 2.7.15
    target python version: 2.7.12

Activity

  1. dw commented on Feb 14, 2019

    @dw
    Member

    It seems the version of Python that ships with OS X does not support POLLIN. The versions shipped in Homebrew have it enabled.

    This means MacOS targets are broken too. I will re-add support for select.select. Thanks for reporting!

  2. enkov commented on Feb 14, 2019

    @enkov
    Author

    Thank for the fast reply!
    I set ansible to use python from the brew and everything works!
    Thanks again!

  3. added 3 commits that reference this issue on Feb 14, 2019
  4. added a commit that references this issue on Feb 14, 2019
    9739947
  5. dw commented on Feb 14, 2019

    @dw
    Member

    This is now on the master branch and will make it into the next release. To be updated when a new release is made, subscribe to https://networkgenomics.com/mail/mitogen-announce/

    Thanks for reporting this!

  6. added a commit that references this issue on Mar 6, 2019
    407307a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions