Skip to content

app no longer passed in as initial argument in Flask-Script commands #2

@danjac

Description

@danjac

Using latest version of Flask-Script (0.3) I get this error:

Traceback (most recent call last):
File "manage.py", line 155, in
manager.run()
File "//lib/python2.6/site-packages/Flask_Script-0.3-py2.6.egg/flaskext/script.py", line 636, in run
sys.argv[2:])
File "/lib/python2.6/site-packages/Flask_Script-0.3-py2.6.egg/flaskext/script.py", line 618, in handle
command.run(**command_namespace.dict)
TypeError: run() takes exactly 6 non-keyword arguments (1 given)

The run() method of Command no longer takes app as first argument, as of version 0.3 (current release) - this is because the "app" is already available as "current_app" in the Flask request context, so it's superfluous.

This is not entirely clear in the documentation, and I will update the Flask-Script docs regarding this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions