So I recently managed to convert a .py file into .exe but the problem is that the .exe file wont open properly. Basically what happens is the command prompt opens for a second and then shows some code for 1 milisecond and closes. I did manage to get a screenshot of what the command prompt says.This keeps happening when I try to open it but not with just that file, but every .py file I convert into .exe
I made a simple code to check if it was only like that for my previous code but its for every code that I make. I also used PyInstaller to convert the .py file into a .exe
import customtkinter as tk
import sys
import os
root = tk.CTk()
root.state('zoomed')
root.wm_title("Test File")
frame = tk.CTkFrame(master=root, height=300, width=600)
frame.pack_propagate(0)
frame.pack(pady=200)`
lbl = tk.CTkLabel(master=frame, text="I like chicken nuggets.", font=("Bahnschrift", 30))
lbl.pack(pady=120)
root.mainloop()
If something is unclear about my explanation, please ask. Im on Windows 11 and I use VS Code.
I asked for help on Discord but no luck. Im hoping somebody could help me here. I want my .exe file to open up like a charm and do its job.