I am building a single directory. Oddly enough, I haven't been including the files in the .spec as data. I've just been dropping them into the directory afterwards. When I add them in the spec and rebuild, my script doesn't get past the initial logging messages. In the build warnings, i'm seeing a top-level warning that it could not include the win32com.genpy module. Not sure if that's related...
Since I'm building a one-folder bundle, my file locations should be correct with the pyinstaller defaults, no? Regards, Ben On Sat, May 4, 2019 at 5:35 AM Elliot Garbus <ellio...@cox.net> wrote: > Are you doing a single file build or a directory build? You need to tell > Pyinstaller where the files are located. Read the section in the docs on > runtime information. > > > > https://pyinstaller.readthedocs.io/en/stable/runtime-information.html > > > > When your program is not frozen, the standard Python variable __file__ is > the full path to the script now executing. When a bundled app starts up, > the bootloader sets the sys.frozen attribute and stores the absolute path > to the bundle folder in sys._MEIPASS. For a one-folder bundle, this is > the path to that folder, wherever the user may have put it. For a one-file > bundle, this is the path to the _MEI*xxxxxx* temporary folder created by > the bootloader > > > > *From: *Marx babu <mbm...@gmail.com> > *Sent: *Friday, May 3, 2019 12:54 AM > *To: *pyinstaller@googlegroups.com > *Subject: *Re: [PyInstaller] win32com.client Issues > > > > Hi, > > Please try out this solution if it can help you . > > complete details are there. > > > https://stackoverflow.com/questions/55870378/python-pyinstaller-exe-throws-filenotfounderror-errno-2-no-such-file-or-direc > > > > > On Sat, Apr 27, 2019 at 1:03 PM Ben Crews <ace...@gmail.com> wrote: > > Hello. I have a script which utilizes the win32com.client module and takes > input from a spreadsheet to generate multiple word documents based on a > standard template. This all works just fine in my dev environment, and with > certain installations on other machines. When I try to package up the whole > system, i've been running the basic pyinstaller myscript.py command. After > it's packaged, I move the input and template files to the same directory as > the exe, and some parts still work. > > > > It seems like the Workbooks.Worksheets.Range() method doesn't work after > I've packaged up. My code will register the win32com application object, > and open up the input file. It will even read the data (I can see it output > with logging statements), but when it gets to a line defining a range, it > just stops. > > > > logging.debug(startCell.Address) #Reports correct value in the log > > logging.debug(endCell.Address) #Reports correct value in the log > > workingRange = InputSheet.Range(startCell, endCell).Value > logging.info(workingRange) > > InputBook.Save() > > InputBook.Close() > > > Through trial and error I've found that if I remove the "Value" the script > will continue on to save and close the workbook, but will not log the data. > I'm truly stumped, and I just don't get this error when running without > pyinstaller. > > > > > > I can't share the full code without authorization from my company, but > does any of this sound familiar? > > > > > > Thanks, > > > > -Ben > > -- > 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 post to this group, send email to pyinstaller@googlegroups.com. > Visit this group at https://groups.google.com/group/pyinstaller. > For more options, visit https://groups.google.com/d/optout. > > > > > -- > > Regards, > Marx Chidambara Babu M.B > > -- > 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 post to this group, send email to pyinstaller@googlegroups.com. > Visit this group at https://groups.google.com/group/pyinstaller. > For more options, visit https://groups.google.com/d/optout. > > > > -- > 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 post to this group, send email to pyinstaller@googlegroups.com. > Visit this group at https://groups.google.com/group/pyinstaller. > For more options, visit https://groups.google.com/d/optout. > -- -Ben -- 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 post to this group, send email to pyinstaller@googlegroups.com. Visit this group at https://groups.google.com/group/pyinstaller. To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/CAKS55pDsbYSWfa7b6euMzJp02g7M4MTjL-xv7hwOQSDo2YQdLA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.