From 1c9effd7b4876f3adda6bbad30e47e48e41d2cb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gra=C3=B1a?= Date: Tue, 3 Jun 2014 15:11:20 -0300 Subject: [PATCH] Avoid IPython warning. thanks @bryant1410. closes #623 --- scrapy/utils/console.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scrapy/utils/console.py b/scrapy/utils/console.py index 25782d512..5dd4539ed 100644 --- a/scrapy/utils/console.py +++ b/scrapy/utils/console.py @@ -13,8 +13,11 @@ def start_python_console(namespace=None, noipython=False, banner=''): raise ImportError() try: - from IPython.frontend.terminal.embed import InteractiveShellEmbed - sh = InteractiveShellEmbed(banner1=banner) + try: + from IPython.terminal import embed + except ImportError: + from IPython.frontend.terminal import embed + sh = embed.InteractiveShellEmbed(banner1=banner) except ImportError: from IPython.Shell import IPShellEmbed sh = IPShellEmbed(banner=banner)