Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
971 views
in Technique[技术] by (71.8m points)

python - PyInstaller Error: FileNotFoundError: [Errno 2] No such file ot directory: 'myKivyfile.kv'

So I have tried to get my python / kivy project into a standalone "exe". I succeeded in making it "onedir" but after it compiled (with no errors) into a single exe, it doesn't work. The app window just flashes and closes. Command I put in to compile: pyinstaller --onefile -w --icon=download.ico --debug=all --add-data filefinder.kv;. filefinder.py. I added the debug flag to figure out what's causing it to crash and got the following window errors:

Failed to execute script pyiboot01_bootstrap

Error: 'NoneType' object has no attribute 'write'

Traceback: ['Traceback (most recent call last):
', ' File 
"Pyinstaller\loader\pyiboot01_bootstrap.py", line 20, in <module>
', ' File]

The full 3rd error

full

For troubleshooting purposes I also compiled it in a windowless mode to get the command prompt output and hopefully shed some light and this issue and in one line I found this gem:
FileNotFoundError: [Errno 2] No such file ot directory: 'filefinder.kv'

So it has something to do with my ".kv" file. The problem is, I don't know what! I have read the docs on what to do when things go wrong but it didn't help me. So I am asking for your help. I am happy to provide any information you may need.

Additional info: Python: 3.9.1 System: Windows 10 Pro Kivy: 2.0.0 Pyinstaller: Latest 5.0 (experimental) I have tried the stable version but got the same results

Cheers!

question from:https://stackoverflow.com/questions/65887630/pyinstaller-error-filenotfounderror-errno-2-no-such-file-ot-directory-myki

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...