Python 处理WSGI脚本时发生异常'/var/www/FlaskApp/FlaskApp.wsgi';
我的烧瓶app.confPython 处理WSGI脚本时发生异常'/var/www/FlaskApp/FlaskApp.wsgi';,python,apache2,flask-appbuilder,Python,Apache2,Flask Appbuilder,我的烧瓶app.conf <VirtualHost *:80> ServerAdmin abc@.edu.pk ServerName 0.0.0.0 ProxyPass / http://localhost:10000/ ProxyPassReverse / http://localhost:10000/ WSGIScriptAlias / /var/www/FlaskApp/flaskapp.w
<VirtualHost *:80>
ServerAdmin abc@.edu.pk
ServerName 0.0.0.0
ProxyPass / http://localhost:10000/
ProxyPassReverse / http://localhost:10000/
WSGIScriptAlias / /var/www/FlaskApp/flaskapp.wsgi \ process-group=FlaskApp application-group=%{GLOBAL}
WSGIDaemonProcess FlaskApp python-path=/usr/local/lib/python3.6/dist-packages/flask/app.py
<Directory /var/www/FlaskApp/FlaskApp/>
WSGIProcessGroup flaskapp.wsgi
WSGIApplicationGroup %{GLOBAL}
Order allow,deny
Allow from all
Require all granted
</Directory>
Alias /static /var/www/FlaskApp/FlaskApp/static
<Directory /var/www/FlaskApp/FlaskApp/static/>
Order allow,deny
Allow from all
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
error.log显示了这一点
Mon May 17 07:01:08.959772 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] mod_wsgi (pid=24913): Exception occurred processing WSGI script '/var/www/FlaskApp/flaskapp.wsgi'.
[Mon May 17 07:01:08.963459 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] Traceback (most recent call last):
[Mon May 17 07:01:08.963557 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 2464, in __call__
[Mon May 17 07:01:08.963567 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] return self.wsgi_app(environ, start_response)
[Mon May 17 07:01:08.963576 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 2450, in wsgi_app
[Mon May 17 07:01:08.963582 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] response = self.handle_exception(e)
[Mon May 17 07:01:08.963590 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1867, in handle_exception
[Mon May 17 07:01:08.963605 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] reraise(exc_type, exc_value, tb)
[Mon May 17 07:01:08.963620 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/usr/local/lib/python3.6/dist-packages/flask/_compat.py", line 39, in reraise
[Mon May 17 07:01:08.963625 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] raise value
[Mon May 17 07:01:08.963632 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 2447, in wsgi_app
[Mon May 17 07:01:08.963637 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] response = self.full_dispatch_request()
[Mon May 17 07:01:08.963645 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1952, in full_dispatch_request
[Mon May 17 07:01:08.963649 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] rv = self.handle_user_exception(e)
[Mon May 17 07:01:08.963657 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1821, in handle_user_exception
[Mon May 17 07:01:08.963661 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] reraise(exc_type, exc_value, tb)
[Mon May 17 07:01:08.963669 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/usr/local/lib/python3.6/dist-packages/flask/_compat.py", line 39, in reraise
[Mon May 17 07:01:08.963673 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] raise value
[Mon May 17 07:01:08.963680 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1950, in full_dispatch_request
[Mon May 17 07:01:08.963685 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] rv = self.dispatch_request()
[Mon May 17 07:01:08.963693 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1936, in dispatch_request
[Mon May 17 07:01:08.963698 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] return self.view_functions[rule.endpoint](**req.view_args)
[Mon May 17 07:01:08.963706 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/var/www/FlaskApp/FlaskApp/__init__.py", line 407, in retrun_face_detected_and_start_recognition
[Mon May 17 07:01:08.963711 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] loop.run_until_complete(find_face(imgID=imgID, imageFile=file))
[Mon May 17 07:01:08.963718 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/usr/lib/python3.6/asyncio/base_events.py", line 484, in run_until_complete
[Mon May 17 07:01:08.963723 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] return future.result()
[Mon May 17 07:01:08.963730 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/var/www/FlaskApp/FlaskApp/__init__.py", line 273, in find_face
[Mon May 17 07:01:08.963735 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] encoding = await do_the_face_find(imgID=imgID, imageFile=imageFile)
[Mon May 17 07:01:08.963743 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/var/www/FlaskApp/FlaskApp/__init__.py", line 238, in do_the_face_find
[Mon May 17 07:01:08.963747 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] imgID=imgID, unknown_encoding=unknown_encoding)
[Mon May 17 07:01:08.963755 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/var/www/FlaskApp/FlaskApp/__init__.py", line 201, in write_unknown_encoding_to_json
[Mon May 17 07:01:08.963764 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] compare_faces_and_update_json(imgID=imgID)
[Mon May 17 07:01:08.963771 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/var/www/FlaskApp/FlaskApp/__init__.py", line 172, in compare_faces_and_update_json
[Mon May 17 07:01:08.963776 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] unknown_data_entry[NAMES] = [unknown_data_entry[NAMES][-1]]
[Mon May 17 07:01:08.963799 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] IndexError: list index out of range
我的python脚本在几个月内运行良好,但从过去2周开始,我的脚本抛出错误“处理WSGI脚本时发生异常'/var/www/FlaskApp/FlaskApp.WSGI'
请帮助我,我的脚本运行得很好,但在过去的两周里,我面临着无法解决的问题
Mon May 17 07:01:08.959772 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] mod_wsgi (pid=24913): Exception occurred processing WSGI script '/var/www/FlaskApp/flaskapp.wsgi'.
[Mon May 17 07:01:08.963459 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] Traceback (most recent call last):
[Mon May 17 07:01:08.963557 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 2464, in __call__
[Mon May 17 07:01:08.963567 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] return self.wsgi_app(environ, start_response)
[Mon May 17 07:01:08.963576 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 2450, in wsgi_app
[Mon May 17 07:01:08.963582 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] response = self.handle_exception(e)
[Mon May 17 07:01:08.963590 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1867, in handle_exception
[Mon May 17 07:01:08.963605 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] reraise(exc_type, exc_value, tb)
[Mon May 17 07:01:08.963620 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/usr/local/lib/python3.6/dist-packages/flask/_compat.py", line 39, in reraise
[Mon May 17 07:01:08.963625 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] raise value
[Mon May 17 07:01:08.963632 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 2447, in wsgi_app
[Mon May 17 07:01:08.963637 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] response = self.full_dispatch_request()
[Mon May 17 07:01:08.963645 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1952, in full_dispatch_request
[Mon May 17 07:01:08.963649 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] rv = self.handle_user_exception(e)
[Mon May 17 07:01:08.963657 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1821, in handle_user_exception
[Mon May 17 07:01:08.963661 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] reraise(exc_type, exc_value, tb)
[Mon May 17 07:01:08.963669 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/usr/local/lib/python3.6/dist-packages/flask/_compat.py", line 39, in reraise
[Mon May 17 07:01:08.963673 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] raise value
[Mon May 17 07:01:08.963680 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1950, in full_dispatch_request
[Mon May 17 07:01:08.963685 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] rv = self.dispatch_request()
[Mon May 17 07:01:08.963693 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1936, in dispatch_request
[Mon May 17 07:01:08.963698 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] return self.view_functions[rule.endpoint](**req.view_args)
[Mon May 17 07:01:08.963706 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/var/www/FlaskApp/FlaskApp/__init__.py", line 407, in retrun_face_detected_and_start_recognition
[Mon May 17 07:01:08.963711 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] loop.run_until_complete(find_face(imgID=imgID, imageFile=file))
[Mon May 17 07:01:08.963718 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/usr/lib/python3.6/asyncio/base_events.py", line 484, in run_until_complete
[Mon May 17 07:01:08.963723 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] return future.result()
[Mon May 17 07:01:08.963730 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/var/www/FlaskApp/FlaskApp/__init__.py", line 273, in find_face
[Mon May 17 07:01:08.963735 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] encoding = await do_the_face_find(imgID=imgID, imageFile=imageFile)
[Mon May 17 07:01:08.963743 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/var/www/FlaskApp/FlaskApp/__init__.py", line 238, in do_the_face_find
[Mon May 17 07:01:08.963747 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] imgID=imgID, unknown_encoding=unknown_encoding)
[Mon May 17 07:01:08.963755 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/var/www/FlaskApp/FlaskApp/__init__.py", line 201, in write_unknown_encoding_to_json
[Mon May 17 07:01:08.963764 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] compare_faces_and_update_json(imgID=imgID)
[Mon May 17 07:01:08.963771 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] File "/var/www/FlaskApp/FlaskApp/__init__.py", line 172, in compare_faces_and_update_json
[Mon May 17 07:01:08.963776 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] unknown_data_entry[NAMES] = [unknown_data_entry[NAMES][-1]]
[Mon May 17 07:01:08.963799 2021] [wsgi:error] [pid 24913:tid 139734772852480] [client 111.68.110.250:2473] IndexError: list index out of range