Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Errors in Python
#1
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,
Reply
#2
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  When does Python detect Errors? stamp1t 1 439 Oct-21-2023, 05:53 PM
Last Post: deanhystad
  Rmarkdown opened by python code - errors Rav013 0 2,085 Apr-27-2021, 03:13 PM
Last Post: Rav013
  Python Request Errors PythonNoob1998 7 3,922 Jan-07-2021, 05:18 PM
Last Post: buran
  Pip Syntax Errors in CMD: Windows 10 and Python 3.8.1 jamesphopper 2 4,443 Feb-08-2020, 07:21 PM
Last Post: jamesphopper
  Python stops without errors shahgourav 4 2,759 Feb-04-2020, 11:44 PM
Last Post: micseydel
  Can the comments produce errors in python? newbieAuggie2019 9 4,274 Nov-26-2019, 12:19 AM
Last Post: micseydel
  Running into errors when installing pip and pip3 on python 2.7 and python 3.6 tej7gandhi 1 2,834 May-05-2019, 10:37 PM
Last Post: snippsat
  Does Python sqlite3 detect connection errors zatlas1 6 3,958 Jan-18-2019, 06:02 AM
Last Post: zatlas1
  Python Errors kendias 26 23,363 May-25-2017, 06:43 PM
Last Post: kendias

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020