Ich habe ein kleines Projekt, das Flask-Admin ausführt, das ich dockerized habe. Plötzlich kann ich das Projekt nicht bauen. Ich habe vorherige Commits durchgespielt und kann nicht herausfinden, was das Problem ist. Es scheint der Import von Flaschen-Marshmallow zu sein, aber ich kann keine weiteren Informationen darüber bekommen, was das verursacht.Beim Importieren von Flask-Marshmallow Unerwarteter Schlüsselwortargumentfehler
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)
und die Rückverfolgung ist:
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'
Update: die Korrektur eingesetzt wurde. Ich habe es gerade getestet und das Paket funktioniert jetzt. – harfangeek
Danke für die Information. Habe gerade den Andock-Container neu aufgebaut und alles funktioniert wieder. – user7692855