mailbagit icon indicating copy to clipboard operation
mailbagit copied to clipboard

mailbagit-gui command not running on Windows

Open gwiedeman opened this issue 2 years ago • 3 comments

Describe the bug While #147 addressed most of the remaining GUI issues mentioned in #76, the mailbagit-gui command as defined as an entry point in setup.py does not fully run in Windows. It opens the GUI window and allows you to fill out the fields, but once you try and run it it returns:

c:\users\greg\appdata\local\programs\python\python37-32\python.exe: can't open file 'C:\Users\Greg\.virtualenvs\mailbag-_Z7D2G4R\Scripts\mailbagit-gui': [Errno 2] No such file or directory

This example is using a virtualenv managed by pipenv, but the same thing happens using the system python. There is a mailbagit-gui.exe file located in that directory and I think that's what's being called when you first run the mailbagit-gui command. If I just run C:\Users\gw234478\.virtualenvs\mailbag-wl96s53w\Scripts\mailbagit-gui it does load the GUI window (even outside of the virtualenv). I think its running python path/to/mailbagit-gui which tries and fails to run the exe.

There is also a mailbagit-gui-script.py file in the scripts directory that appears to run the exe? Running this directly also fails with the same result.

This does not happen on Ubuntu 20.04 so it appears to be limited to Windows. Looks like the entry_point for ubuntu is a Python script instead of an .exe, which explains why it runs fine with python mailbagit-gui but Windows does not. This makes me think its a Gooey bug not handling or supporting entry points on Windows because of this.

gui-error

To Reproduce Steps to reproduce the behavior:

  1. enter the command mailbagit-gui
  2. fill out the options in the GUI
  3. Click "Start"

Expected behavior After you click "Start" it should package the file(s) provided into a mailbag.

Environment (please complete the following information):

  • GUI or command line?: GUI
  • OS: Win10
  • Python version: multiple but using 3.9.12 right now.

Additional context Works fine from the mailbagit-gui.py script which just runs mailbagit.gui(). This is used to build the executable so that path works fine.

gwiedeman avatar May 02 '22 14:05 gwiedeman