IPython 5.1.0 not working with Flask-Script 2.0.5
SlangingCode opened this issue · 1 comments
SlangingCode commented
Hello,
I get the following error when trying to use IPython 5.1.0 with Flask-Script 2.0.5:
ImportError Traceback (most recent call last)
...\AppData\Local\Programs\Python\Python35\lib\site-packages\flask_script\commands.py in run(self, no_ipython, no_bpython)
299 # 0.10.x
--> 300 from IPython.Shell import IPShellEmbed
301 ipshell = IPShellEmbed(banner=self.banner)
ImportError: No module named 'IPython.Shell'
Any chance someone can give me some guidance on fixing this? (And no, using IPython.embed() does not fix it.)
If I can get a little guidance, I would be willing to fix for the current version of Flask 0.11.1 and the upcoming 1.x version.
SlangingCode commented
Here's the manage.py file that I created:
#!/usr/bin/env python
from flask_script import Manager
from app import app
manager = Manager(app)
@manager.shell
def make_shell_context():
""" Creates a python REPL with several default imports
in the context of the app
"""
return dict(app=app)
if __name__ == "__main__":
manager.run()
I am running the following command:
python manage.py shell