A
A
Alexey Denisov2020-08-07 18:03:46
Python
Alexey Denisov, 2020-08-07 18:03:46

Why is the script exiting?

Tell me there is a script for loading text files (documents)
The script sorts through the names of the files from the list, and creates links, then loads the files.
At some point, the console window just closes,
it happens that it reaches the end of the list, displays data and waits for 'Enter' to be pressed, after which it closes, as it should be, since the command is written at the end of the script . There is some kind of system log to view - what's going on, crash or something else ? input('')

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SKEPTIC, 2020-08-07
@Denisov80

Some kind of exception is caught in the program.
Wrap all code in:

try:
    сюда засунь свой код
except Exception as e:
    print(e)
a = input()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question