Comments (4)
There is a bug here but I'm afraid fixing it wouldn't allow mitogen to send the lxml module. Importing lxml
requires importing lxml.etree
, whch is a binary module. Binary modules are too platform specific for Mitogen to copy them across.
The error message should have been
TASK [xml] **********************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ModuleNotFoundError: The Mitogen master process was unable to serve 'lxml.etree'. It may be a native Python extension, or it may be missing entirely. Check the importer debug logs on the master for more information.
fatal: [bertha.local]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3"}, "changed": false, "msg": "Failed to import the required Python library (lxml) on bertha's Python /usr/bin/python3. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"}
from mitogen.
To use the Ansible xml module you'll need to install lxml on the target host(s), regardless of Mitogen.
from mitogen.
ansible_mitogen.process._setup_responder()
populates mitogen.core.Importer.whitelist
. However this causes the logic in mitogen.core.is_blacklisted_import()
to report all non-whitelisted modules (e.g. lxml) as blacklisted. Causing misleading/false denials such as
ModuleNotFoundError: 'lxml' is present in the Mitogen importer blacklist, therefore this context will not attempt to request it from the master, as the request will always be refused.
from mitogen.
Looking through old commits this behaviour appears to be by design. If so it comes as a surprise to me.
from mitogen.
Related Issues (20)
- Download link points to an HTTP 404 (unreleased version) HOT 8
- mitogen.core.ChannelError HOT 4
- How to reduce Mitogen logs when enabled Ansible debug mode? HOT 1
- Unwanted files in precompiled pip package HOT 1
- Python 3.12 support HOT 25
- Mitogen broken after ansible security patch for "unsafe variables" HOT 16
- Error when trying to unpickle data (cannot unpickle 'ansible.utils.unsafe_proxy'/'AnsibleUnsafeText') HOT 5
- tox.ini: add-apt-repository requires software-properties-common, apt update is unnecessary HOT 1
- ansible.legecy.dnf leave rpmdb locks open HOT 2
- bug mitogen version 0.3.4 with running ansible 2.15 or 2.16 HOT 1
- The attribute 'remote_user' of the object 'connection._play_context' contains the variable name instead of its value. HOT 2
- wait_for_connection times out when using Ansible with mitogen on standard Rocky 8.9 AWS images
- mitogen.utils.cast() can silently fail to cast string subtypes (e.g. AnsibleUnsafeText)
- Test files, documentation source and others missing from source packages
- tests.ansible.tests.MockLinuxPolicyTest is always skipped
- Ansible 9 (ansible-core 2.16) support HOT 1
- DeprecationWarning: 'pkgutil.find_loader' is deprecated and slated for removal in Python 3.14; use importlib.util.find_spec() instead
- Tests pass, but it takes sereral manual retries HOT 1
- Tests are slow to run, 15-20 minutes for individual jobs, 40-60 minutes overall
- Play fails if temp directory is deleted mid-play HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mitogen.