Python Forum

Full Version: Errors in Python
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Dear All,
I faced the following issue: i created a code that crashed Spider (annaconda) program and Udacity (learning institute) python platform cause it ran indefinitely, it took me too long to know the mistake cause i couldn’t find any guidance in error message or so.

Can debugging help or it shall find no issues and will also excute the code and crash the program? if debugging can't help, can i approach python developers to propose a new type of error that might crash programs since they run indefinitely, and utilise debugging in this case?

Yours,
Add some real-time print statements to know exactly where the program is hanging up
as a start, use something like:
print('Entering myfunction(zig) zig: {}'.format(zig))
replacing myfunction(zig) with actual method (or function) name.

Once you have isolated the problem to a specific area, you can add print before each statements to isolate the line (or lines) of code causing the actual problem.

print statements are your friend