IOBinding.open looks for an self.editwin.interp (after having already verified that self.editwin exists), but catches exceptions with a bare except. This narrows it to an AttributeError. (Note that the save method already assumes that missing attributes on an editwin will be represented as AtributeError rather than TypeError.)