Giter VIP home page Giter VIP logo

Comments (4)

moreati avatar moreati commented on May 28, 2024

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.

moreati avatar moreati commented on May 28, 2024

To use the Ansible xml module you'll need to install lxml on the target host(s), regardless of Mitogen.

from mitogen.

moreati avatar moreati commented on May 28, 2024

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.

moreati avatar moreati commented on May 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.