I\'m currently building a program in C# which will call functions in provided python script files. Some of these script files calls _getframe() in sys
_getframe()
sys
A little out of the scope of the question, but meant for anyone else getting this error by invoking a Python script using the ipy.exe interpreter directly.
You can just add the argument -X:FullFrames. So for example invoke the script like
-X:FullFrames
ipy.exe -X:FullFrames script.py