Thank you, It works perfectly now after fixing the bug on line 103 of host.py for wexpect and by using the instructions listed here, https://github.com/raczben/wexpect/wiki/Wexpect-with-pyinstaller.
I now have another question. The compiled folders of my script + wexpect are full of many different files and I am curious of how I may be able to compress all this down to a single .exe file or to a few of them? Since I can't use the "onefile" feature of pyinstaller due to wexpect, I am now looking for an alternative way to have the minimal amount of required files in order to properly run my script on a new windows environment that doesn't have python. On Tuesday, January 18, 2022 at 5:29:38 PM UTC-6 bwoodsend wrote: > That’s this line > <https://github.com/raczben/wexpect/blob/8ce905938801edc6f3b4154a617f06efafb73e8f/wexpect/host.py#L375-L378> > > telling you that the ./wexpect/wexpect.exe it was hoping to find > <https://github.com/raczben/wexpect/blob/8ce905938801edc6f3b4154a617f06efafb73e8f/wexpect/host.py#L345-L347> > > isn’t there. This will be where those rather odd instructions from that > wiki page you shared come in. You’ll need to build wexpect.exe and place > it inside your application. > > On Tuesday, January 18, 2022 at 8:01:27 AM UTC Blake D. wrote: > >> [image: original.png] >> >> ^^^This is part of my original code and I do not have the same " from . >> __init__ import spawn" as per the example sent, but I still tried to add >> "from . import spawn" as recommended and I got this error. >> >> [image: Capture1.PNG] >> [image: Capture4.PNG] >> >> I also tried compiling the code below with swapping the "." for "wexpect" >> and got the same error from the original code. >> [image: Capture2.png] >> [image: Capture.PNG] >> On Monday, January 10, 2022 at 3:07:29 AM UTC-6 bwoodsend wrote: >> >>> That’s a bug in wexpect. See here >>> <https://github.com/raczben/wexpect/blob/8ce905938801edc6f3b4154a617f06efafb73e8f/wexpect/host.py#L103> >>> >>> where they’re misusing the __init__.py as a regular module. It should >>> be just from . import spawn. Try changing that line in your copy and if >>> it works, I'll ask the wexpect devs to change it permanently. >>> >>> On Friday, January 7, 2022 at 9:06:35 AM UTC Blake D. wrote: >>> >>>> >>>> [image: Capture.PNG] >>>> This is the error message I keep receiving. I've tried to do what ' >>>> https://github.com/raczben/wexpect/wiki/Wexpect-with-pyinstaller ' >>>> says and I followed it exactly but I still receive the exact same error as >>>> seen above. I also tried importing the missing module as a hidden import >>>> (--hidden-import=...) but that did not work either. I am also very new to >>>> python so that doesn't help me very much in troubleshooting. Any guidance >>>> will be greatly appreciated! >>>> >>> -- You received this message because you are subscribed to the Google Groups "PyInstaller" group. To unsubscribe from this group and stop receiving emails from it, send an email to pyinstaller+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/4ef9a607-6b04-4a3a-b098-0c76c4501818n%40googlegroups.com.