0

Simple question but for some weird reason I cannot find the answer online.

For some error in a python script, i.e.:

$ python3 script.py
'NoneType' object is not iterable

How can I make it show where the error is being hit in my script (ex. line number, or the '^' thing), without additional code.

Fuad
  • 1,419
  • 1
  • 16
  • 31
  • 1
    Do you have an example code to go with this? – 12944qwerty Jun 26 '20 at 23:29
  • Does this answer your question? [Python exception handling - line number](https://stackoverflow.com/questions/14519177/python-exception-handling-line-number) – Aleksandar Stojadinovic Jun 26 '20 at 23:37
  • For an uncaught exception, it normally will. What you're seeing is because you *do already* have "additional code" - a try/except block somewhere that is reporting the message from the caught exception, but not the traceback. – Karl Knechtel Jun 26 '20 at 23:45

0 Answers0