WasatchPhotonics / ENLIGHTEN

Open-source spectroscopy application for controlling and taking measurements from Wasatch Photonics spectrometers.
https://wasatchphotonics.com/product-category/software/
MIT License
3 stars 6 forks source link

Problems running pexpect from installer #305

Closed mzieg closed 10 months ago

mzieg commented 10 months ago

I know pexpect had been working okay from the installer "at some point," because it is how we communicated with KnowItAll as well as various other external compiled executables through what became the plugin interface.

However, it's not working at the moment, with plugins using PopenSpawn giving errors like the following.

Screenshot 2023-10-02 at 9 26 26 AM

The shell command being run by PopenSpawn works fine in a normal DOS shell, and in fact the plugin works perfectly when run from source. Something about pyinstaller seems to be breaking our pexpect pipelines.

A long thread on Wexpect and pyinstaller provided some insight into what might be going on, and a wiki page showing how to resolve that. (We could probably move to Wexpect on Windows if that helped, but I'm not sure I want to go down that path yet.)

This SO suggested the problem may be pyinstaller's --windowed (which has since morphed into --noconsole), so I removed that from bootstrap, and pexpect worked again. I don't want to release a "standard" customer ENLIGHTEN release with the extra DOS window showing, but that's okay for my task this week.

I may try this suggestion to minimize the console window after launch...that would be a compromise for now.

mzieg commented 10 months ago

resolved by #304