Skip to content

AttributeError: 'PluginLoader' object has no attribute 'get_with_context' #770

Closed
@arrfab

Description

@arrfab

When using mitogen from master branch, ansible now tracebacks with the following error :

ansible -m ping all -vvv
ansible 2.9.16
  ansible python module location = /usr/lib/python3.6/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.6.8 (default, Aug 24 2020, 17:57:11) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]

ERROR! Unexpected Exception, this is probably a bug: 'PluginLoader' object has no attribute 'get_with_context'
the full traceback was:

Traceback (most recent call last):
  File "/usr/bin/ansible", line 123, in <module>
    exit_code = cli.run()
  File "/usr/lib/python3.6/site-packages/ansible/cli/adhoc.py", line 166, in run
    result = self._tqm.run(play)
  File "/usr/lib/python3.6/site-packages/ansible/executor/task_queue_manager.py", line 261, in run
    strategy = strategy_loader.get(new_play.strategy, self)
  File "/usr/lib/python3.6/site-packages/ansible/plugins/loader.py", line 552, in get
    self._module_cache[path] = self._load_module_source(name, path)
  File "/usr/lib/python3.6/site-packages/ansible/plugins/loader.py", line 525, in _load_module_source
    spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/var/lib/tobisna-dev/mitogen-master/ansible_mitogen/plugins/strategy/mitogen_linear.py", line 55, in <module>
    import ansible_mitogen.loaders
  File "/var/lib/tobisna-dev/mitogen-master/ansible_mitogen/loaders.py", line 62, in <module>
    connection_loader__get = connection_loader.get_with_context
AttributeError: 'PluginLoader' object has no attribute 'get_with_context'

It happens on CentOS 8, with ansible-2.9.16-1.el8.noarch , using default python 3.6.8 and mitogen from current master branch.
But it was working some days ago, so I just tried to revert to specific tag https://github.com/dw/mitogen/releases/tag/v0.2.10-rc.0 and then it worked again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects-0.3Issues related to 0.3.X Mitogen releasesansibleIssues relating to Mitogen for Ansibleuser-reported

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions