ImportError: cannot import name debug" while reading response header from upstream
DEBUG = True
/usr/bin/python /opt/xxx/xxx/manage.py runfcgi method=prefork host=127.0.0.1 port=7001
...
...
/usr/bin/python /opt/xxx/xxx/manage.py runfcgi method=prefork host=127.0.0.1 port=7001
server
{
listen 80;
server_name dhq.dhq.lab;
proxy_connect_timeout 3000000;
proxy_send_timeout 3000000;
proxy_read_timeout 3000000;
client_max_body_size 50g;
location / {
fastcgi_pass 127.0.0.1:7001;
fastcgi_pass_header Authorization;
fastcgi_intercept_errors off;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param REMOTE_USER $remote_user;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_SOFTWARE "nginx";
fastcgi_param GATEWAY_INTERFACE "CGI/1.1";
fastcgi_connect_timeout 5000;
fastcgi_read_timeout 5000;
fastcgi_send_timeout 5000;
}
location /static {
alias /opt/xxx/xxx/media;
access_log off;
}
location /media {
alias /opt/xxx/xxx/media;
access_log off;
}
access_log /var/log/nginx/xxx.log web;
}
http://192.168.0.24/nasmp/v4.1/xxxx"
2018/05/08 11:25:32 [error] 2579#0: *9120 FastCGI sent in stderr: "Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 558, in run
File "/usr/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 1118, in handler
File "/usr/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 272, in __call__
File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 169, in get_response
File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 202, in handle_uncaught_exception
ImportError: cannot import name debug" while reading response header from upstream, client: 192.168.0.189, server: dhq.dhq.com, request: "GET /nasmp/v4.1/downloadstaticfile_nasmpv4?filepath=nasclient/chrome_installer.exe HTTP/1.1", upstream: "fastcgi://127.0.0.1:7001", host: "192.168.0.24", referrer: "
1
dhq OP Django 1.3.7
Python 2.7 |
2
kumakiti 2018-05-08 19:01:39 +08:00 via iPhone
找你自己写的代码的部分,说的很明显了
|
3
dhq OP @kumakiti 你是说下载浏览器那个请求吗,每个请求都是这样的报错,只是说在不同的页面里显示这个 unhandleunhandle excptexception,哥你是有遇见过吗
|
4
Hopetree 2018-05-09 09:08:03 +08:00
哇,好古老的 python 和 django
|