gpt4 book ai didi

python - 类型错误 : __init__() got an unexpected keyword argument 'unbound_message'

转载 作者:行者123 更新时间:2023-12-05 00:42:30 34 4
gpt4 key购买 nike

当我尝试从 flask_restx 导入字段时出现上述错误。

from flask_restx import fields

有什么问题。它适用于我的本地机器,但不适用于远程机器。

完整的错误跟踪:

  File "/root/.clearml/venvs-builds/3.8/lib/python3.8/site-packages/clearml/binding/import_bind.py", line 54, in __patched_import3
mod = builtins.__org_import__(
File "/root/.clearml/venvs-builds/3.8/lib/python3.8/site-packages/flask_restx/__init__.py", line 4, in <module>
from . import fields, reqparse, apidoc, inputs, cors
File "/root/.clearml/venvs-builds/3.8/lib/python3.8/site-packages/clearml/binding/import_bind.py", line 54, in __patched_import3
mod = builtins.__org_import__(
File "/root/.clearml/venvs-builds/3.8/lib/python3.8/site-packages/flask_restx/fields.py", line 16, in <module>
from flask import url_for, request
File "/root/.clearml/venvs-builds/3.8/lib/python3.8/site-packages/clearml/binding/import_bind.py", line 54, in __patched_import3
mod = builtins.__org_import__(
File "/root/.clearml/venvs-builds/3.8/lib/python3.8/site-packages/flask/__init__.py", line 4, in <module>
from . import json as json
File "/root/.clearml/venvs-builds/3.8/lib/python3.8/site-packages/clearml/binding/import_bind.py", line 54, in __patched_import3
mod = builtins.__org_import__(
File "/root/.clearml/venvs-builds/3.8/lib/python3.8/site-packages/flask/json/__init__.py", line 8, in <module>
from ..globals import current_app
File "/root/.clearml/venvs-builds/3.8/lib/python3.8/site-packages/clearml/binding/import_bind.py", line 54, in __patched_import3
mod = builtins.__org_import__(
File "/root/.clearml/venvs-builds/3.8/lib/python3.8/site-packages/flask/globals.py", line 56, in <module>
app_ctx: "AppContext" = LocalProxy( # type: ignore[assignment]
TypeError: __init__() got an unexpected keyword argument 'unbound_message'

最佳答案

我在我的要求中添加了 flask==2.1.3 并且它起作用了。我认为这是当前最新版本的 flask 的问题/

关于python - 类型错误 : __init__() got an unexpected keyword argument 'unbound_message' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73337927/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com