Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Window Based" requires empty --debug #126

Closed
OverLordGoldDragon opened this issue Oct 9, 2020 · 7 comments
Closed

"Window Based" requires empty --debug #126

OverLordGoldDragon opened this issue Oct 9, 2020 · 7 comments

Comments

@OverLordGoldDragon
Copy link

Otherwise below minimalistic project won't run in .exe; using Python 3.7.7, latest all-else. Worth listing in issues (or fixing).

@brentvollebregt
Copy link
Owner

I just packaged a script as one directory and window based with the following contents:

import sys

f = open(r"C:\Users\Brent\Downloads\hello.text", 'w')
f.write('works' + str(sys.executable))
f.close()

This works completely fine for me, no errors occur.

I'm unsure what the title "Window Based" requires empty --debug has to do with this, did you get that as an error message? Does your error only occur in Python 3.7.7?

@OverLordGoldDragon
Copy link
Author

demo.mp4 with your project. Haven't tested with other Python versions.

Anaconda virtual environment
name: dash
channels:
  - plotly
  - anaconda
  - conda-forge
  - defaults
dependencies:
  - alabaster=0.7.12=py_0
  - argh=0.26.2=pyh9f0ad1d_1002
  - astroid=2.4.2=py37hc8dfbb8_0
  - async_generator=1.10=py_0
  - atomicwrites=1.4.0=pyh9f0ad1d_0
  - attrs=20.2.0=pyh9f0ad1d_0
  - autopep8=1.5.4=pyh9f0ad1d_0
  - babel=2.8.0=py_0
  - backcall=0.2.0=pyh9f0ad1d_0
  - backports=1.0=py_2
  - backports.functools_lru_cache=1.6.1=py_0
  - bcrypt=3.2.0=py37h4ab8f01_0
  - bleach=3.2.1=pyh9f0ad1d_0
  - brotlipy=0.7.0=py37h4ab8f01_1000
  - ca-certificates=2020.6.20=hecda079_0
  - certifi=2020.6.20=py37hf50a25e_2
  - cffi=1.14.3=py37h26f1ce3_0
  - chardet=3.0.4=py37hf50a25e_1008
  - click=7.1.2=pyh9f0ad1d_0
  - cloudpickle=1.6.0=py_0
  - colorama=0.4.3=py_0
  - cryptography=3.1.1=py37h26f1ce3_0
  - dash=1.16.2=pyh9f0ad1d_0
  - dash-core-components=1.12.1=pyh9f0ad1d_0
  - dash-html-components=1.1.1=pyh9f0ad1d_0
  - dash-renderer=1.8.2=pyh9f0ad1d_0
  - dash-table=4.10.1=pyh9f0ad1d_0
  - decorator=4.4.2=py_0
  - defusedxml=0.6.0=py_0
  - diff-match-patch=20200713=pyh9f0ad1d_0
  - docutils=0.16=py37hc8dfbb8_1
  - entrypoints=0.3=py37hc8dfbb8_1001
  - flake8=3.8.4=py_0
  - flask=1.1.2=pyh9f0ad1d_0
  - flask-compress=1.5.0=py_0
  - future=0.18.2=py37hc8dfbb8_1
  - icu=58.2=vc14hc45fdbb_0
  - idna=2.10=pyh9f0ad1d_0
  - imagesize=1.2.0=py_0
  - importlib-metadata=2.0.0=py_1
  - importlib_metadata=2.0.0=1
  - intervaltree=3.0.2=py_0
  - ipykernel=5.3.4=py37h5ca1d4c_0
  - ipython=7.18.1=py37hc6149b9_0
  - ipython_genutils=0.2.0=py_1
  - isort=5.6.1=py37hc8dfbb8_0
  - itsdangerous=1.1.0=py_0
  - jedi=0.17.1=py37hc8dfbb8_0
  - jinja2=2.11.2=pyh9f0ad1d_0
  - jpeg=9b=vc14h4d7706e_1
  - jsonschema=3.2.0=py37hc8dfbb8_1
  - jupyter_client=6.1.7=py_0
  - jupyter_core=4.6.3=py37hc8dfbb8_1
  - jupyterlab_pygments=0.1.2=pyh9f0ad1d_0
  - keyring=21.4.0=py37hc8dfbb8_1
  - lazy-object-proxy=1.4.3=py37h8055547_2
  - libpng=1.6.37=ha81a0f5_2
  - libsodium=1.0.17=h2fa13f4_0
  - libspatialindex=1.9.3=he025d50_3
  - markupsafe=1.1.1=py37h0013d47_2
  - mccabe=0.6.1=py_1
  - mistune=0.8.4=py37h8055547_1001
  - nbclient=0.5.0=py_0
  - nbconvert=6.0.7=py37hc8dfbb8_0
  - nbformat=5.0.7=py_0
  - nest-asyncio=1.4.1=py_0
  - numpydoc=1.1.0=py_1
  - openssl=1.1.1h=he774522_0
  - packaging=20.4=pyh9f0ad1d_0
  - pandoc=2.10.1=he774522_0
  - pandocfilters=1.4.2=py_1
  - paramiko=2.7.2=pyh9f0ad1d_0
  - parso=0.7.0=py_0
  - pathtools=0.1.2=py_1
  - pexpect=4.8.0=py37hc8dfbb8_1
  - pickleshare=0.7.5=py37hc8dfbb8_1001
  - pip=20.2.3=py_0
  - plotly=4.9.0=py_0
  - pluggy=0.13.1=py37hc8dfbb8_2
  - prompt-toolkit=3.0.7=py_0
  - psutil=5.7.2=py37h0013d47_1
  - pycodestyle=2.6.0=pyh9f0ad1d_0
  - pycparser=2.20=pyh9f0ad1d_2
  - pydocstyle=5.1.1=py_0
  - pyflakes=2.2.0=pyh9f0ad1d_0
  - pygments=2.7.1=py_0
  - pylint=2.6.0=py37hc8dfbb8_0
  - pynacl=1.4.0=py37h230ea1a_1
  - pyopenssl=19.1.0=py_1
  - pyparsing=2.4.7=pyh9f0ad1d_0
  - pyqt=5.9.2=py37ha878b3d_0
  - pyrsistent=0.17.3=py37h4ab8f01_1
  - pysocks=1.7.1=py37hc8dfbb8_1
  - python=3.7.7=h81c818b_4
  - python-dateutil=2.8.1=py_0
  - python-jsonrpc-server=0.4.0=pyh9f0ad1d_0
  - python-kaleido=0.0.3=py37_0
  - python-language-server=0.35.1=py_0
  - python_abi=3.7=1_cp37m
  - pytz=2020.1=pyh9f0ad1d_0
  - pywin32=227=py37hfa6e2cd_0
  - pywin32-ctypes=0.2.0=py37hc8dfbb8_1001
  - pyyaml=5.1.2=py37hfa6e2cd_0
  - pyzmq=19.0.2=py37h453f00a_1
  - qdarkstyle=2.8.1=pyh9f0ad1d_1
  - qt=5.9.7=vc14h73c81de_0
  - qtawesome=1.0.1=pyh9f0ad1d_0
  - qtconsole=4.7.7=pyh9f0ad1d_0
  - qtpy=1.9.0=py_0
  - requests=2.24.0=pyh9f0ad1d_0
  - retrying=1.3.3=py_2
  - rope=0.18.0=pyh9f0ad1d_0
  - rtree=0.9.4=py37h804a536_1
  - setuptools=49.6.0=py37hf50a25e_2
  - sip=4.19.24=py37h1834ac0_2
  - six=1.15.0=pyh9f0ad1d_0
  - snowballstemmer=2.0.0=py_0
  - sortedcontainers=2.2.2=pyh9f0ad1d_0
  - sphinx=3.2.1=py_0
  - sphinxcontrib-applehelp=1.0.2=py_0
  - sphinxcontrib-devhelp=1.0.2=py_0
  - sphinxcontrib-htmlhelp=1.0.3=py_0
  - sphinxcontrib-jsmath=1.0.1=py_0
  - sphinxcontrib-qthelp=1.0.3=py_0
  - sphinxcontrib-serializinghtml=1.1.4=py_0
  - spyder=4.1.5=py37_0
  - spyder-kernels=1.9.4=py37hc8dfbb8_0
  - sqlite=3.33.0=he774522_1
  - testpath=0.4.4=py_0
  - toml=0.10.1=pyh9f0ad1d_0
  - tornado=6.0.4=py37hfa6e2cd_0
  - traitlets=5.0.4=py_1
  - typed-ast=1.4.1=py37hfa6e2cd_0
  - ujson=4.0.0=py37h1834ac0_0
  - urllib3=1.25.10=py_0
  - vc=14.1=h869be7e_1
  - vs2015_runtime=14.16.27012=h30e32a0_2
  - watchdog=0.10.3=py37hc8dfbb8_1
  - wcwidth=0.2.5=pyh9f0ad1d_2
  - webencodings=0.5.1=py_1
  - werkzeug=1.0.1=pyh9f0ad1d_0
  - wheel=0.35.1=pyh9f0ad1d_0
  - win_inet_pton=1.1.0=py37hc8dfbb8_1
  - wincertstore=0.2=py37hc8dfbb8_1005
  - wrapt=1.11.2=py37h8055547_0
  - yaml=0.1.7=vc14h4cb57cf_1
  - yapf=0.30.0=pyh9f0ad1d_0
  - zeromq=4.3.2=ha925a31_3
  - zipp=3.3.0=py_0
  - zlib=1.2.11=vc14h1cdd9ab_1
  - pip:
    - altgraph==0.17
    - auto-py-to-exe==2.7.8
    - bottle==0.12.18
    - bottle-websocket==0.2.9
    - eel==0.12.4
    - gevent==20.9.0
    - gevent-websocket==0.10.1
    - greenlet==0.4.17
    - pefile==2019.4.18
    - playsound==1.2.2
    - pyinstaller==4.0
    - pyinstaller-hooks-contrib==2020.9
    - whichcraft==0.6.1
    - zope-event==4.5.0
    - zope-interface==5.1.2

@brentvollebregt
Copy link
Owner

I noticed you are just pasting screenshots of the dialogs that appear when you get an error. Have you read the debugging section in the post you provided? What is the actual error you are getting?

@OverLordGoldDragon
Copy link
Author

@brentvollebregt Have you seen the .mp4? No error in debug mode using "Console Based", only "Window Based" (don't know how to debug latter, no instructions on that, and .py never even runs).

@brentvollebregt
Copy link
Owner

I see, your first screenshot of auto-py-to-exe's UI did not have --debug selected (I can tell by the current command) so it was unclear how --debug had anything to do with this.

Some proper reproduction steps:

  1. Create a basic Python script that does not output to stdout/stderr but has some form of side effect to prove it's running (like creating a folder/file
  2. Package using:
    • One directory (--onedir)
    • Window based (--windowed)
    • debug all (--debug "all")
  3. Run the executable

Dialogs will appear indicating there were errors running the executable, the dialog displaying the error contains the text "failed to execute script pyiboot01_bootstrap". The resolution for the reproduction steps above is to not use --debug, but then we cannot debug the executable.

I used the generated command to run pyinstaller manually and the same issue raised which shows this is a pyinstaller-specific issue.

An empty debug flag is no longer valid in pyinstaller, you either provide an expected value with it or don't pass the flag at all:

pyinstaller: error: argument -d/--debug: invalid choice: 'C:/Users/Brent/GitHub/auto-py-to-exe/output/test.py' (choose from 'all', 'imports', 'bootloader', 'noarchive')

pyinstaller/pyinstaller#4213 looks like it relates to this issue but they are all talking about the issue being module names which I don't believe is the case with this one.

@brentvollebregt
Copy link
Owner

Closing due to no activity in more than three months and no more information provided about the issue.

@OverLordGoldDragon
Copy link
Author

@brentvollebregt I figured your reply was more of a note / user reference, these are the same steps I used to produce the bug, rather than a solution. I don't recall what I did in the end but I've successfully packaged an .exe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants