##// END OF EJS Templates
Catch failure to find source file for traceback...
Thomas Kluyver -
Show More
@@ -925,7 +925,12 b' class VerboseTB(TBTools):'
925
925
926 elif file.endswith(('.pyc', '.pyo')):
926 elif file.endswith(('.pyc', '.pyo')):
927 # Look up the corresponding source file.
927 # Look up the corresponding source file.
928 file = openpy.source_from_cache(file)
928 try:
929 file = openpy.source_from_cache(file)
930 except ValueError:
931 # Failed to get the source file for some reason
932 # E.g. https://github.com/ipython/ipython/issues/9486
933 return '%s %s\n' % (link, call)
929
934
930 def linereader(file=file, lnum=[lnum], getline=ulinecache.getline):
935 def linereader(file=file, lnum=[lnum], getline=ulinecache.getline):
931 line = getline(file, lnum[0])
936 line = getline(file, lnum[0])
General Comments 0
You need to be logged in to leave comments. Login now