How to settle this pyinstaller error?


#1

I use pyinstaller to package my application, like this below,

pyinstaller semi-auto_configuration_checker/proxy_checker.py

but error occurred here:

Failed to execute script proxy_checker
Traceback (most recent call last):
  File "proxy_checker.py", line 13, in <module>
  File "/private/var/folders/mn/w7_j5kj130q1j65wtf27k7gmkqhx_4/T/pip-build-0xmyhu/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
  File "site-packages/mitmproxy/flow/__init__.py", line 5, in <module>
  File "/private/var/folders/mn/w7_j5kj130q1j65wtf27k7gmkqhx_4/T/pip-build-0xmyhu/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
  File "site-packages/mitmproxy/flow/master.py", line 15, in <module>
  File "/private/var/folders/mn/w7_j5kj130q1j65wtf27k7gmkqhx_4/T/pip-build-0xmyhu/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
  File "site-packages/mitmproxy/onboarding/app.py", line 12, in <module>
  File "site-packages/netlib/utils.py", line 75, in path
ValueError: dataPath: /Users/bill.li/dist/proxy_checker/mitmproxy/onboarding/templates does not exist.

it is impossible to add these templates of mitmproxy onto the *.spec files, I think.


Use mitmproxy with PyInstaller
#2

You can see how we build our binaries in https://github.com/mitmproxy/mitmproxy/tree/master/release. Building binaries is a fairly brittle process with PyInstaller, so I would very much recommend looking into other options for distributing your software.