mirror of
https://github.com/brentvollebregt/auto-py-to-exe.git
synced 2026-04-25 19:55:49 +03:00
[GH-ISSUE #386] python function 'exit' raise exception #314
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 @boyapavel on GitHub (Apr 11, 2023).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/386
Traceback (most recent call last):
File "gw_stat_gen.py", line 255, in
File "gw_stat_gen.py", line 11, in get_list_files
NameError: name 'exit' is not defined
[20944] Failed to execute script 'gw_stat_gen' due to unhandled exception!
line 11 looks like : exit('can not open your directory '+path+' .exit')
@github-actions[bot] commented on GitHub (Apr 11, 2023):
👋 Hi, just a reminder that if you haven't read the help post yet, give it a read to see if your issue is covered in it and make sure to follow the debugging section.
Also please note, as stated in the README, if your issue is only associated with your application and not auto-py-to-exe itself, please do not create an issue in this repository - instead, comment on the help post, video or create a new discussion.
@boyapavel commented on GitHub (Apr 11, 2023):
i change fuction exit() to sys.exit() - it`s a good workaround for me.
but why exit() function raise exception like "NameError: name 'exit' is not defined" ?
@boyapavel commented on GitHub (Apr 11, 2023):
for example, i wrote simple python script with exit() function.
script:
test = ''while test != '2':test = input('please give me 2 or anything else. 2 - is exit; your choise: ')exit('bye, bye')debug attached here.
test_debug_all.txt
@brentvollebregt commented on GitHub (Apr 12, 2023):
I have added a section to the debugging help for this: https://nitratine.net/blog/post/issues-when-using-auto-py-to-exe/#nameerror-name-exit-is-not-defined.
Here is a snippet from the additions: