导入Flask-Marshmallow时出现Unexpected关键字参数错误

时间:2017-03-10 23:39:26

标签: flask-admin marshmallow

我有一个运行Flask-Admin的小项目,我已经停靠了。突然之间,我无法建立项目。我已经完成了之前的提交,无法解决问题所在。它似乎是烧瓶棉花糖的进口,但我无法获得有关造成它的原因的任何进一步信息。

if(!isset($error))
{
    $filename = "adduser.csv";

    // create the file if it doesn't exist
    $column_headings = "First Name, Last Name, Full Name, User Logon, User Logon(pre-2003), Password\n";

    if (!file_exists($filename)) {
        file_put_contents($filename, $column_headings);
    }

    $Content = "$fn, $ln, $full, $log, $log2, $pwd\n";

    // append the content to the file
    file_put_contents($filename, $Content, FILE_APPEND);

}

并且追溯是:

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)

1 个答案:

答案 0 :(得分:0)

我刚刚从头开始安装了Flask项目和依赖项,我也有同样的错误。似乎棉花糖包已经过了7月更新:https://pypi.python.org/pypi/marshmallow "上传时间:2017-03-10"

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