diff --git a/IPython/core/shellapp.py b/IPython/core/shellapp.py index aa3d6ec..76c11ca 100644 --- a/IPython/core/shellapp.py +++ b/IPython/core/shellapp.py @@ -278,13 +278,14 @@ class InteractiveShellApp(Configurable): self.log.info("Loading IPython extension: %s" % ext) self.shell.extension_manager.load_extension(ext) except: - self.log.warn("Error in loading extension: %s" % ext + - "\nCheck your config files in %s" % self.profile_dir.location - ) - self.shell.showtraceback() + msg = ("Error in loading extension: {ext}\n" + "Check your config files in {location}".format( + ext=ext, + location=self.profile_dir.location + )) + self.log.warn(msg, exc_info=True) except: - self.log.warn("Unknown error in loading extensions:") - self.shell.showtraceback() + self.log.warn("Unknown error in loading extensions:", exc_info=True) def init_code(self): """run the pre-flight code, specified via exec_lines"""