According to the docs, this change only impacted one-directory builds. In version 5 and prior the exe and all the files were located in the same directory. In version 6 in a one-directory build all the files are placed in sub-directory from where the .exe is located.
I'm surprised you are able to build a one-file build with kivy, by copying the kv files post build. When pyinstaller is creating the exe it is zipping all of the files. You may want to use --add -data to the command line, https://pyinstaller.org/en/stable/usage.html#cmdoption-add-data or move to using a specfile. ________________________________ From: [email protected] <[email protected]> on behalf of Aftab Sarwar <[email protected]> Sent: Thursday, May 9, 2024 8:47 AM To: PyInstaller <[email protected]> Subject: Re: [PyInstaller] Re: Pyinstaller exe shows blank screen What is the new relative path in Pyinstaller 6.x.x? Could you please tell me? On Thursday, May 9, 2024 at 8:44:47 PM UTC+5 [email protected] wrote: The location of files relative to the exe changed in PyInstaller 6.0 You could try going back to version 5 and see if that makes a difference. WIth kivy I have always used one-directory builds with a specfile. I then use innosetup to build a Windows Installer. ________________________________ From: [email protected] <[email protected]> on behalf of Aftab Sarwar <[email protected]> Sent: Thursday, May 9, 2024 8:37 AM To: PyInstaller <[email protected]> Subject: [PyInstaller] Re: Pyinstaller exe shows blank screen Actually I do not add any files to the exe, I simple run the pyinstaller -F program.py Then place all the files in the dist directory. This has worked for me for very long. I make sure that all the kv files are there in the dist directory. Here is my data from the log file: [INFO ] Logger: Record log in C:\Users\aftab\.kivy\logs\kivy_24-05-09_99.txt [INFO ] deps: Successfully imported "kivy_deps.gstreamer" 0.3.3 [INFO ] deps: Successfully imported "kivy_deps.angle" 0.4.0 [INFO ] deps: Successfully imported "kivy_deps.glew" 0.3.1 [INFO ] deps: Successfully imported "kivy_deps.sdl2" 0.7.0 [INFO ] Kivy: v2.3.0 [INFO ] Kivy: Installed at "D:\COBRA_CRS_Redesign\crs\kivy_venvir\Lib\site-packages\kivy\__init__.py" [INFO ] Python: v3.12.0 (tags/v3.12.0:0fb18b0, Oct 2 2023, 13:03:39) [MSC v.1935 64 bit (AMD64)] [INFO ] Python: Interpreter at "D:\COBRA_CRS_Redesign\crs\kivy_venvir\Scripts\python.exe" [INFO ] Logger: Purge log fired. Processing... [INFO ] Logger: Purge finished! [INFO ] Factory: 195 symbols loaded [INFO ] Image: Providers: img_tex, img_dds, img_sdl2 (img_pil, img_ffpyplayer ignored) [INFO ] Window: Provider: sdl2 [INFO ] GL: Using the "OpenGL" graphics system [INFO ] GL: Backend used <sdl2> [INFO ] GL: OpenGL version <b'4.6.0 - Build 31.0.101.4032'> [INFO ] GL: OpenGL vendor <b'Intel'> [INFO ] GL: OpenGL renderer <b'Intel(R) Iris(R) Xe Graphics'> [INFO ] GL: OpenGL parsed version: 4, 6 [INFO ] GL: Shading version <b'4.60 - Build 31.0.101.4032'> [INFO ] GL: Texture max size <16384> [INFO ] GL: Texture max units <32> [INFO ] Window: auto add sdl2 input provider [INFO ] Window: virtual keyboard not allowed, single mode, not docked [INFO ] Text: Provider: sdl2 [DEBUG ] Starting new HTTPS connection (1): api.portal.cobrafiringsystems.com:443<http://api.portal.cobrafiringsystems.com:443> [DEBUG ] https://api.portal.ddd.com:443 "GET /users/me HTTP/1.1" 200 1090 [INFO ] GL: NPOT texture support is available [DEBUG ] Starting new HTTPS connection (1): admin.ignitefiringsystems.com:443<http://admin.ignitefiringsystems.com:443> [DEBUG ] Starting new HTTPS connection (1): cobrafiringsystems.com:443<http://cobrafiringsystems.com:443> [WARNING] Deprecated property "<NumericProperty name=padding_x>" of object "<kivy.uix.button.Button object at 0x0000021E0910FA80>" was accessed, it will be removed in a future version [DEBUG ] https://cobrafiringsystems.com:443 "GET /static/software/SPY/crs_files.zip HTTP/1.1" 301 None [DEBUG ] Starting new HTTPS connection (1): www.cobrafiringsystems.com:443<http://www.cobrafiringsystems.com:443> [DEBUG ] https://www.ddd.com:443 "GET /static/software/SPY/crs_files.zip HTTP/1.1" 200 4059522 [DEBUG ] https://admin.ddd.com:443 "GET /crs_api.php HTTP/1.1" 404 None [INFO ] Base: Start application main loop On Thursday, May 9, 2024 at 8:30:58 PM UTC+5 Elliot Garbus wrote: Share your pyinstaller spec file. My guess is that the program can not find the kv files. DId you add them to the datas section? There is a kivy logfile located at: "C:\Users\your_username\.kivy\logs", read the log file for clues to the issue. Here is a working spec file - you may find this helpful. This project has a dir structure that complicates things a little. https://github.com/ElliotGarbus/KivyCythonWinSample/blob/main/inno-pyinstaller/w11-app.spec In the most recent version of pyinstaller there was a change to the content directory location, either use full file path addressing or set the contents directory to '.' See the exe section: contents_directory='.', read: https://pyinstaller.org/en/stable/runtime-information.html#using-file If you sent the contents directory to '.', you do not need to use __file__, the launcher will set the current working directory. If you do not change the content_directory, you must reference files relative to __file__. On Thursday, May 9, 2024 at 8:04:03 AM UTC-7 Aftab Sarwar wrote: I have a Kivy app that works fine from Pycharm IDE or when run from command line. However, after converting it to an exe with PyInstaller, the app only shows a blank screen and stays there. I'm using Python 3.12, Kivy 2.3 and Pyinstaller 6.6.0. [crs_blank_screen.png] Note: The app/window does not close itself, it just stays there but I cannot see any widget on it. I have tried to downgrade the Pyinstaller to 6.0.0 and 4.0.0 with no success. I have also tried to downgrade Kivy to 2.0.0 with no success. I see no message on console after "Start application main loop". Please help as I have already spent much time on it. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/dde0214e-70de-4e58-a31a-145066c18f87n%40googlegroups.com<https://groups.google.com/d/msgid/pyinstaller/dde0214e-70de-4e58-a31a-145066c18f87n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- 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 [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/29daacaf-d3e8-4cf1-9147-0df06c6fc895n%40googlegroups.com<https://groups.google.com/d/msgid/pyinstaller/29daacaf-d3e8-4cf1-9147-0df06c6fc895n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/DM4PR14MB62054224D47CB409F40B7E91FDE62%40DM4PR14MB6205.namprd14.prod.outlook.com.
