This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Python failing in markupsafe module when running ansible
Type: crash Stage: resolved
Components: macOS Versions: Python 2.7
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: ronaldoussoren Nosy List: coryfklein, r.david.murray, ronaldoussoren
Priority: normal Keywords:

Created on 2014-07-30 18:00 by coryfklein, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (4)
msg224331 - (view) Author: Cory Klein (coryfklein) Date: 2014-07-30 18:00
After installing ansible and python using homebrew, if I run ansible it crashes after calling into python's markupsafe:

$ ansible
Traceback (most recent call last):
  File "/usr/local/Cellar/ansible/1.6.10/libexec/bin/ansible", line 5, in <module>
    pkg_resources.run_script('ansible==1.6.10', 'ansible')
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 492, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 1350, in run_script
    execfile(script_filename, namespace, namespace)
  File "/usr/local/Cellar/ansible/1.6.10/lib/python2.7/site-packages/ansible-1.6.10-py2.7.egg/EGG-INFO/scripts/ansible", line 25, in <module>
    from ansible.runner import Runner
  File "/usr/local/Cellar/ansible/1.6.10/lib/python2.7/site-packages/ansible-1.6.10-py2.7.egg/ansible/runner/__init__.py", line 32, in <module>
    import jinja2
  File "/usr/local/Cellar/ansible/1.6.10/libexec/lib/python2.7/site-packages/Jinja2-2.7.1-py2.7.egg/jinja2/__init__.py", line 33, in <module>
    from jinja2.environment import Environment, Template
  File "/usr/local/Cellar/ansible/1.6.10/libexec/lib/python2.7/site-packages/Jinja2-2.7.1-py2.7.egg/jinja2/environment.py", line 13, in <module>
    from jinja2 import nodes
  File "/usr/local/Cellar/ansible/1.6.10/libexec/lib/python2.7/site-packages/Jinja2-2.7.1-py2.7.egg/jinja2/nodes.py", line 18, in <module>
    from jinja2.utils import Markup
  File "/usr/local/Cellar/ansible/1.6.10/libexec/lib/python2.7/site-packages/Jinja2-2.7.1-py2.7.egg/jinja2/utils.py", line 520, in <module>
    from markupsafe import Markup, escape, soft_unicode
  File "/Library/Python/2.7/site-packages/markupsafe/__init__.py", line 14, in <module>
    from markupsafe._compat import text_type, string_types, int_types, \
ImportError: No module named _compat
msg224332 - (view) Author: Cory Klein (coryfklein) Date: 2014-07-30 18:00
Also to note: this is on OS X 10.10 Yosemite
msg224336 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2014-07-30 18:11
As is indicated by the fact that markupsafe is in the 'site-packages' directory, markupsafe is a 3rd party library and is not part of the python standard library.  Most likely the version of markupsafe you have does not match the one ansible is expecting, but if that isn't enough info to solve your problem you should reach out for support from the anisble community.
msg224337 - (view) Author: Cory Klein (coryfklein) Date: 2014-07-30 18:17
I'll track things down in that direction. Thanks, David.
History
Date User Action Args
2022-04-11 14:58:06adminsetgithub: 66307
2014-07-30 18:17:54coryfkleinsetmessages: + msg224337
2014-07-30 18:11:10r.david.murraysetstatus: open -> closed

nosy: + r.david.murray
messages: + msg224336

resolution: third party
stage: resolved
2014-07-30 18:00:54coryfkleinsetmessages: + msg224332
2014-07-30 18:00:28coryfkleincreate