#๐Ÿ”’ PyInstaller Error

10 messages ยท Page 1 of 1 (latest)

fickle zincBOT
#

@novel crypt

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

novel crypt
#

I was trying to turn a .py file into an .exe file, but after turning it into one, I always got this error: "Traceback (most recent call last):
File "main.py", line 151, in <module>
File "main.py", line 29, in init
File "PIL\Image.py", line 3431, in open
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\myname\Desktop\JETIX\output\jet.png'" and I have no idea how to fix it. I was using auto-py-to-exe and PyInstaller, both gave me the same error.

pliant vessel
#

the image is not packed inside the application and it would try to read the image as how your original python code would

#

and it couldn't find the image file

#

(I don't know how to properly pack file can make it accessible, so I would recommend packing the image in base64 form inside your python script and make it decode the base64 and load image from byte data

#

or... just have the image there

novel crypt
#

ohhh makes sense, ill try that. thanks! :)

fickle zincBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.