Author: Kristján Valur Jónsson (kristjan.jonsson) *
Date: 2012-07-16 10:28
Reporting an error early in the python startup, before importing is properly initialized, can be tricky. For example, here: if (PyImport_ImportFrozenModule("_frozen_importlib") <= 0) { Py_FatalError("Py_Initialize: can't import _frozen_importlib"); The problem is, that _Py_DisplaySourceLine will set an exception because it cannot import the io module. And this will terminate the traceback output. The attached patch aims to rectify it by ignoring errors from this api in traceback.c
Author: Kristján Valur Jónsson (kristjan.jonsson) *
Date: 2012-07-17 10:33
Certainly. But the submission filter would have caught that. The question is: Is it acceptible to simply ignore errors from this api when printing tracebacks? There are other errors that can be returned as well. The trouble is, any errors in the traceback reporting will be ignored anyway, since there is no way to report them :)
> The trouble is, any errors in the traceback reporting will be ignored > anyway, since there is no way to report them :) Which is a good reason to ignore them, isn't it? ;)