mirror of
https://github.com/brentvollebregt/auto-py-to-exe.git
synced 2026-04-25 11:45:49 +03:00
[GH-ISSUE #25] Got fatal error after running the compiled .exe file #24
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ghanteyyy on GitHub (Sep 6, 2018).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/25
I compiled my python script with auto-py-to-exe but got Fatal error Failed to execute Spyder (my script name) when I ran the output .exe file in my another machine where there is no python or pyinstaller or auto-py-to-exe installed. I chose noconsole, onefile options in auto-py-to-exe window. How can I fix this error?
@brentvollebregt commented on GitHub (Sep 6, 2018):
Regarding that the python script runs properly by itself then this would have been caused by incorrect configuration or third party modules. The best way to find what the issue is, is to select the -d flag's button in the advanced tab and then re-package it. This will mean the exe is now in a debugging mode. Open up cmd and then run the exe using cmd e.g. "C:/folder/path/myexe.exe". Any errors will be preserved in the console which you were previously missing.
What is the error that you are getting? (there will 100% be one if the message you are stating is appearing)
I have had people complain to be about this error a crazy amount of times and I haven't had a situation yet where is isn't misconfiguration or referencing of files that clearly don't exist.
@ghanteyyy commented on GitHub (Sep 7, 2018):
Using -d flag I got following result:
How can I solve this problem so that my executable file work fine?
@brentvollebregt commented on GitHub (Sep 7, 2018):
Please do not use windowed mode. Use the default console model so errors don't appear in new windows for each line. It makes it very very hard to read. Also as stated before, the error should be in the console.
@ghanteyyy commented on GitHub (Sep 7, 2018):
Ops sorry for that. After using the default console model I got:
So there is the error. How can solve this problem?
@brentvollebregt commented on GitHub (Sep 8, 2018):
Searching the last line, Google provides the first search result linking to stackoverflow.com/q/51181828. Looking at this question, even though it is regarding Java, OpenCV is the culprit. This means that there is something wrong with OpenCV - you most likely haven't added files that OpenCV needs. An answer to the question states that the path variable was incorrect, so you will most likely need to pack the files that OpenCV was looking for using the path variable.
If you feel I have looked at this incorrectly, feel free to say. This seems not to be an issue with auto-py-to-exe or PyInstaller.
@niteshJyo commented on GitHub (Dec 31, 2019):
After doing this my application showing just an cmd window but not running as it should be ?? What can i do ?
@brentvollebregt commented on GitHub (Jan 1, 2020):
@niteshJyo could you please explain what you are trying to do and how you are doing it?
@niteshJyo commented on GitHub (Jan 1, 2020):
Converting this into .exe file
#Creating Scroll text widgt
import tkinter as tk
import Download as dw
from tkinter import scrolledtext ,messagebox
from tkinter import Menu
import youtube_dl
#Functions
def downloadVideo():
s = entry.get()
dw.downloads(s)
def about():
messagebox._show('About' , "App is designed by Nitesh")
root = tk.Tk()
#Define GUI Window
root.title("YouTube Downloader")
root.wm_iconbitmap(".img\youtube.ico")
Width,height = 405,300
root.geometry(f"{Width}x{height}")
root.resizable(0,0)
#Button
photo= tk.PhotoImage(file=".img\add.png" )
button = tk.Button(root ,textvariable = 'submit',image = photo,width = 50 , height = 40,relief = 'flat' , command = downloadVideo)
button.grid(row=0,column = 1)
#Entry
entry = tk.StringVar()
Entry = tk.Entry(root,textvariable = entry,width = 22 , font = ('Arial',20) , relief = 'flat' )
Entry.focus() # Place cursor into Entry
Entry.grid(row = 0,column = 0 , padx = 8)
#Scroll Bar
scr = scrolledtext.ScrolledText(root,width= 46 ,height = 14, wrap = tk.WORD )
scr.grid(row = 1,column = 0,columnspan = 2)
#Menu bar
mainMenu = Menu(root)
#File Menu
fileMenu = Menu(mainMenu,tearoff = 0)
fileMenu.add_command(label = "New")
fileMenu.add_separator()
fileMenu.add_command(label = "Exit",command = quit)
mainMenu.add_cascade(label = "File",menu = fileMenu)
#Download Menu
downloads = Menu(mainMenu , tearoff = 0 )
mainMenu.add_cascade(label = 'Downloads' , menu = downloads)
#Help Menu
helpMenu = Menu(mainMenu,tearoff=0)
helpMenu.add_command(label ="About" , command = about)
mainMenu.add_cascade(label = "Help",menu = helpMenu)
root.config(menu = mainMenu)
root.mainloop()
@brentvollebregt commented on GitHub (Jan 1, 2020):
Can you please what is going wrong? You haven't explained the configuration you are using and any errors you are getting.
@yasharth291 commented on GitHub (Apr 11, 2020):
@brentvollebregt

My code is running in IDE but giving fatal error failed to execute the script.
and my code is all right.
@brentvollebregt commented on GitHub (Apr 11, 2020):
@yasharth291 this issue is closed. Please create a new issue if you believe there is an issue with auto-py-to-exe.
If this is not an issue with auto-py-to-exe, comment on my blog post or YouTube video linked in the README with details for some help.
@DevEmmy commented on GitHub (Jul 1, 2020):
I've same problem as well.
@brentvollebregt commented on GitHub (Jul 1, 2020):
@Veen-123 this issue is closed. Please create a new issue if you believe there is an issue with auto-py-to-exe.
If this is not an issue with auto-py-to-exe, comment on my blog post or YouTube video linked in the README with details for some help.
@ghanteyyy commented on GitHub (Jul 3, 2020):
Oh my god. This issue is still getting comment after almost 2 years. Just to make update there is no any bug in auto-py-to-exe. The error was in cv2 itself. cv2 needs cv2.cp37-win32.pyd in the same directory of the executable generated by auto-py-to-exe. So after copying cv2.cp37-win32.pyd from C:\Python37-32\Lib\site-packages\cv2 to my .exe directory; the problem was solved.
So anybody who gets the Fatal Error. Make executable in console mode with debug mode enabled then you will get the exact place where the error occurred and just copy the error message in google then search and I am pretty sure that you will solve your error.
@akshaysuresh123 commented on GitHub (May 26, 2021):
to all the people who are getting error while running exe file and its wrking perfctly in py file the issue that i faced was that the directory in which the exe file is created it does not have all the modules that we are using so u can actualy find the missing modules by just reading the traceback carefully or an easier way is to just copy the whole packages inside ur sitepackages folder from your main python directory to the directory where your exe file is right now and it should solve all your problems.
also copy the share folder in the exe directory