NSIS (Windows) after PyInstaller Kivy app can't find database

83 views
Skip to first unread message

NumesSanguis

unread,
Feb 22, 2016, 8:36:31 PM2/22/16
to Kivy users support
If I pack my Windows app with NSIS after using PyInstaller, it cannot find the internal database I included.
However if I make the same folder structure outside the standalone .exe, it does find the database.
Why can it not find the included database?

Please see for the full details of the this question:
http://stackoverflow.com/questions/35552659/nsis-after-pyinstaller-kivy-app-cant-find-database
Message has been deleted

ZenCODE

unread,
Feb 23, 2016, 3:39:22 AM2/23/16
to Kivy users support
Normally it would say if it can't find the file. From your other message (not a valid Win32 app), it might somehow be corrupting the database?

I would suggest running the install then trying to open the sqlite db with an SQLite app e.g. SQLite studio. If that can't open it, then you know it's corrupting the database. Then open it with a text editor: that might give you a clue as to what is going wrong.

NumesSanguis

unread,
Feb 23, 2016, 4:54:23 AM2/23/16
to Kivy users support
Thanks for the suggestion. I just extracted my NSIS .exe with 7zip and then opened the database with sqlitebrowser.
http://sqlitebrowser.org/
Everything went fine with opening the database, so it seems it has either something to do with an incorrect path or somehow it corrupts the PyInstaller .exe (but with an external database everything works fine?).

I don't know what changed, but when opening the NSIS .exe with 7zip now, it doesn't give an error extracting the PyInstaller .exe anymore.
However when trying to run the extracted PyInstaller .exe, I get the following error:
PyInstaller Bootloader 3.x
LOADER: executable is D:\path\KanjiOrigin\KanjiOrigin.exe
LOADER: homepath is D:\path\KanjiOrigin
LOADER: _MEIPASS2 is NULL
LOADER: archivename is D:\path\KanjiOrigin\KanjiOrigin.exe
LOADER: pyi_arch_check_cookie failed
LOADER: archivename is D:\path\KanjiOrigin\KanjiOrigin.pkg
LOADER: Cannot open archive: D:\path\KanjiOrigin\KanjiOrigin.pkg
Cannot open self D:\path\KanjiOrigin\KanjiOrigin.exe or archive D:\path\KanjiOrigin\KanjiOrigin.pkg

ZenCODE

unread,
Feb 23, 2016, 6:45:17 AM2/23/16
to Kivy users support
Okay, so lets start from the most basic assumptions. Can you paste the code you use to open the database? And if you can send me a link to download the installer, I can check the paths. It must be something to do with paths: I've built many NSIS installer without issues.

Seeing the word Kanji, it might be a unicode issue, but that's a guess: your paths seems ASCII friendly Are you using the standard NSIS installer, or the unicode version? :-)

NumesSanguis

unread,
Feb 23, 2016, 10:54:16 AM2/23/16
to Kivy users support
It has been solved ^_^: http://stackoverflow.com/questions/35552659/nsis-after-pyinstaller-kivy-app-cant-find-database
It had to do with relative paths versus absolute paths in my NSIS file.

I went for the unicode installer, because I felt it could otherwise bring problems.

Thank you for trying to help :)


Reply all
Reply to author
Forward
0 new messages