mirror of
https://github.com/brentvollebregt/auto-py-to-exe.git
synced 2026-04-26 04:05:49 +03:00
[GH-ISSUE #92] Fatal error - pyiboot01_bootstrap #89
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 @matheusmews on GitHub (Apr 9, 2020).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/92
Hi, first of all I would like to thank your for your great job, auto-py-to-exe is great!
Now im trying to insert a piece of code on my own code to check date for trial purpose but i got Fata error: Failed to execute script `yiboot01_bootstrap.
I activated the debug flag on advanced, so show the following. When i run it show this large logs and then pop a message wich should appear if the code validate the date and then initiate. But how I got the fatal error this message pops and then the program close and the debugger delete all messages and close too.
Debug screen:
I should say the code was working as .exe properly before i add this "check date trial" code.
Beside that, i should also say the code(with check date) is working if i run thru CMD.
The code i included is that:
Can your help me someway?
Sorry any spelling mistake, english is not my first language.
Thank you!
@brentvollebregt commented on GitHub (Apr 10, 2020):
Was this the whole debug output? It seems there is no error at the end?
Would it be possible for you to break down your program into the simplest form that reproduces this error.
@matheusmews commented on GitHub (Apr 10, 2020):
I managed to do the code works. I don't know what was wrong but definely wasn' a auto-py-to-exe issue.
Thank you brentvollebregt to take a time to answer me and trying help.
Edit:
it work on my pc, but do not work on my notebook. both are x64.
My guess is why my principal scripts call other py scripts, could it be the problem? can autopy2exe compile multiple scripts at once?
@brentvollebregt commented on GitHub (Apr 10, 2020):
Have you ran it with cmd to preserve the output and see what the error is? The error will tell you what the problem is.
@matheusmews commented on GitHub (Apr 10, 2020):
"Re-package your project and open up the command prompt / terminal and cd to the directory where the executable / package was output to. If you are using one-directory cd into that directory. Now execute ./my_project.exe (substitute the names)."
after cd to the directory i should use the command: start ./nameofscript.exe ?
Edit:
well, i tried
start ./very_secret_script.pyon cmd and then show this:this log is the same i pasted in first comment and the pop up window is a part of my script wich run after check the trial date plus the hard drive id. when/if i close the message window, the promtp erase all msg without showing any error.
i should say that when i compile as "one directory" + "consoled based" and flag debuger it do not run on my notebook neither on my pc (wich run properly if i compile as one directory + window based and no debug flag).
one more time im sorry for boring you with those dumb questions and waste your time, but im a very beginner "coder"(in fact just a casual one) and do not speak english fluently.
anyway i would apreciate your help to solve this problem.
@brentvollebregt commented on GitHub (Apr 10, 2020):
Are there any files you are absolutely referencing in your project? Also when debugging, I highly recommend using "Console Based" where possible.
@matheusmews commented on GitHub (Apr 10, 2020):
I use lines like that:
the main .py code calls other .py code to recognize images that are stored in folders inside the main code folder.
Im using the console based to debugging as you recommended. I do not know if i debug correctly but debbuing do not give me errors, the window that I mencioned pops (like code should run) but when i close it the cmd erase the msgs and then close itself. I mean the cmd debug dont preserve any message error, so i do not know where to look for problems.
@brentvollebregt commented on GitHub (Apr 11, 2020):
That
data_filepathvalue, does it exist on the machine you are trying to run the executable on? Your program will be looking there.@matheusmews commented on GitHub (Apr 11, 2020):
well, its not at same path C:/Users/thoma/Desktop/test2/x_data/y.json, but y.json was included (by autopy2exe) in output folder C:\Users\thoma\output\very_secret_script\x_data. I copied the very_secret_script folder and tried on my notebook. As i included "additional files" folders, the y.json was copied to output.
@brentvollebregt commented on GitHub (Apr 11, 2020):
But you have instructed for your code to look explicitly at
C:/Users/thoma/Desktop/test2/x_data/y.json; for that exact file in that exact file. If you want to package the file in the executable, you will need to reference the file relatively - otherwise, how would your script find it?This is definitely one of your issues.
@matheusmews commented on GitHub (Apr 11, 2020):
it makes perfect sense. I'll try fix it now.
any other issue that you have already noticed?? -besides my lack of knowledge, of course
@brentvollebregt commented on GitHub (Apr 11, 2020):
Everything else looks ok. Might pay to set up logging in your application so you can see where it is stopping and figure out what line is the culprit.
@matheusmews commented on GitHub (Apr 11, 2020):
worked perfectly. I tested it on two other computers. I really appreciate your help cause its not every day that someone more experienced is willing to help an amateur with such elementary doubts. Thank you again!