导入 Flask-Marshmallow 时出现意外的关键字参数错误

When importing Flask-Marshmallow Unexpected keyword argument error

我有一个小项目 运行 Flask-Admin,我已经对接了它。突然之间,我无法构建项目。我已经完成了以前的提交,但无法弄清楚问题是什么。它似乎是 flask-marshmallow 的导入,但我无法获得有关导致它的原因的任何进一步信息。

from flask import Flask, render_template, url_for, redirect
from flask_admin import Admin, AdminIndexView
from flask_sqlalchemy import SQLAlchemy
from flask_admin.contrib.sqla import ModelView
from flask_security import Security, SQLAlchemyUserDatastore, current_user, login_required, utils
from wtforms.fields import PasswordField
flask_admin import helpers as admin_helpers
from flask_marshmallow import Marshmallow

app = Flask(__name__)
app.config.from_pyfile('config.py', silent=True)

db = SQLAlchemy(app)
ma = Marshmallow(app)

回溯是:

Traceback (most recent call last):
admin |   File "parcelnotifier.py", line 1, in <module>
admin |     from app import app
admin |   File "./app/__init__.py", line 8, in <module>
admin |     from flask_marshmallow import Marshmallow
admin |   File "/usr/local/lib/python3.5/dist-packages/flask_marshmallow/__init__.py", line 29, in <module>
admin |     from . import sqla
admin |   File "/usr/local/lib/python3.5/dist-packages/flask_marshmallow/sqla.py", line 13, in <module>
admin |     import marshmallow_sqlalchemy as msqla
admin |   File "/usr/local/lib/python3.5/dist-packages/marshmallow_sqlalchemy/__init__.py", line 4, in <module>
admin |     from .schema import (
admin |   File "/usr/local/lib/python3.5/dist-packages/marshmallow_sqlalchemy/schema.py", line 98, in <module>
admin |     class TableSchema(with_metaclass(TableSchemaMeta, ma.Schema)):
admin |   File "/usr/local/lib/python3.5/dist-packages/marshmallow/compat.py", line 66, in __new__
admin |     return meta(name, bases, d)
admin |   File "/usr/local/lib/python3.5/dist-packages/marshmallow/schema.py", line 106, in __new__
admin |     klass.opts = klass.OPTIONS_CLASS(meta, ordered=ordered)
admin  | TypeError: __init__() got an unexpected keyword argument 'ordered'

我刚刚从头安装了一个 Flask 项目和依赖项,但我遇到了完全相同的错误。昨天似乎已经更新了 marshmallow 包:https://pypi.python.org/pypi/marshmallow "Uploaded : 2017-03-10"

此错误已报告给开发团队:https://github.com/marshmallow-code/marshmallow/issues/597