Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

IPython 5.1.0 not working with Flask-Script 2.0.5 #171

Open

Description

@SlangingCode

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.

Activity

  1. SlangingCode commented on Dec 13, 2016

    @SlangingCode
    Author

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions