gpt4 book ai didi

apache - Apache 中的 `NameError: name ' 类型错误 ' is not defined`(mod_wsgi)

转载 作者:行者123 更新时间:2023-12-04 11:33:42 27 4
gpt4 key购买 nike

安装版本
Apache

  • apr-1.6.5
  • apr-util-1.6.1
  • httpd-2.4.7
  • mod_wsgi-4.6.8
  • pcre-8.32

  • Python
  • 3.8.5

  • 姜戈
  • 3.1.2

  • Apache http.conf
    Listen 3600
    WSGISocketPrefix /var/run/wsgi
    <VirtualHost *:3600>
    WSGIDaemonProcess project_name display-name=project_name
    WSGIScriptAlias / /data/project_name/config/wsgi.py process-group=api application-group=api
    ServerName project_name
    <Directory /data/project_name/config>
    Order allow,deny
    Allow from all
    Require all granted
    <Files wsgi.py>
    Require all granted
    </Files>
    </Directory>
    </VirtualHost>
    错误日志
    Exception ignored in: <function Local.__del__ at 0x7fd675a70a60>
    Traceback (most recent call last):
    File "/data/venv/api/lib/python3.8/site-packages/asgiref/local.py", line 96, in __del__
    NameError: name 'TypeError' is not defined
    上面的错误日志一遍遍的出来。
    不知道为什么不使用asgi时会出现asgi相关的错误。

    最佳答案

    我在我的日志中看到了相同的类似内容,只有在 apache 关闭(并因此重新启动)期间。正如@GrahamDumpleton 几年前在一个类似风格的问题(有不同的错误)中所回答的那样,在关闭 python 解释器时,后台线程可能仍在运行。见 NameError: name 'hasattr' is not defined - Python3.6, Django1.11, Ubuntu16-17, Apache2.4, mod_wsgi

    关于apache - Apache 中的 `NameError: name ' 类型错误 ' is not defined`(mod_wsgi),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64674403/

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