Why is etree module from xml missing?


Wrote a custom script hooking into mitmproxy/web which is working just fine but there is some xml processing I need to do and xml.etree.ElementTree is optimal for this but not available from your compiled binary. I am running this on Ubuntu 16.04 and using mitmproxy 4.0.3

Mitmproxy: 4.0.1 binary
Python: 3.6.3
OpenSSL: OpenSSL 1.1.0h 27 Mar 2018
Platform: Linux-4.4.0-127-generic-x86_64-with-debian-stretch-sid

On mitmproxy startup I get the following error:

mitmweb --ssl-insecure -v -s body_saver.py
/bin/sh: /tmp/_MEIyrqk9r/libtinfo.so.5: no version information available (required by /bin/sh)
Web server listening at
Loading script body_saver.py
in script body_saver.py: cannot import name ‘etree’
Proxy server listening at http://*:8080

import os
import json

from xml import etree <- this import causes the failure



Our binaries only contain parts of Python’s stdlib to save space. If you need additional modules, you need to install mitmproxy via pip or from source: https://docs.mitmproxy.org/stable/overview-installation/


And to build it requires python 3.6? Is that correct?