Fix AttributeError InteractiveConsole