gpt4 book ai didi

python - Django Zappa 部署中的包装器错误

转载 作者:行者123 更新时间:2023-12-05 06:35:42 24 4
gpt4 key购买 nike

我正在尝试使用 Zappa 部署我的 Django 应用程序。我使用的是 python 3.6(不过,我的 MacBook 上也安装了 python 2.7;从未使用过)。部署一切顺利,除了当我转到 url 时,我收到此错误。

"{'message': 'An uncaught exception happened while servicing this request. You can investigate this with the zappa tail command.', 'traceback': ['Traceback (most recent call last):\n', ' File \"/var/task/handler.py\", line 452, in handler\n response = Response.from_app(self.wsgi_app, environ)\n', ' File \"/var/task/werkzeug/wrappers.py\", line 903, in from_app\n return cls(*_run_wsgi_app(app, environ, buffered))\n', ' File \"/var/task/werkzeug/wrappers.py\", line 57, in _run_wsgi_app\n return _run_wsgi_app(*args)\n', ' File \"/var/task/werkzeug/test.py\", line 884, in run_wsgi_app\n app_rv = app(environ, start_response)\n', \"TypeError: 'NoneType' object is not callable\n\"]}"

当我使用 tail 命令时,出现以下错误。

[1522350439826] 'NoneType' object is not callable

[1522350561286] [DEBUG] 2018-03-29T19:09:21.282Z afbf4f1c-3384-11e8-8a03-a1095dcd99f5 Zappa Event: {'time': '2018-03-29T19:09:19Z', 'detail-type': 'Scheduled Event', 'source': 'aws.events', 'account': '753712688736', 'region': 'us-east-1', 'detail': {}, 'version': '0', 'resources': ['arn:aws:events:us-east-1:753712688736:rule/r-suri-production-zappa-keep-warm-handler.keep_warm_callback'], 'id': 'f15a5fd5-aaf9-dfb7-1553-d14bb33d1b2b', 'kwargs': {}}

[1522350561286] [DEBUG] 2018-03-29T19:09:21.282Z afbf4f1c-3384-11e8-8a03-a1095dcd99f5 Zappa Event: {}

我已经尝试从头开始重置我的虚拟环境和 requirements.txt,但没有帮助。

这是我的 Zappa 设置文件的样子

{
"production": {
"aws_region": "us-east-1",
"django_settings": "r_suri.settings",
"profile_name": "default",
"slim_handler": "true",
"project_name": "r-suri",
"runtime": "python3.6",
"s3_bucket": "r-suri2"
}
}

有谁知道这个错误是什么?我该如何解决?

最佳答案

此错误可能是由以下 SQLite 问题引起的:https://github.com/Miserlou/Zappa/issues/1880

请使用 zappa tail <ENV_NAME> 部署期间检查 zappa 日志

关于python - Django Zappa 部署中的包装器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49563491/

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