首页 > 解决方案 > 使用 apache2 部署 django 时加载数据时出错

问题描述

我有一个 django 应用程序可以正常工作runserver,但是当我使用 apache2 和 mod_wsgi 部署它时,我得到了这个奇怪的错误:

[wsgi:error] ... WARNING load Error occurred during loading data. Trying to use cache server https://fake-useragent.herokuapp.com/browsers/0.1.11
[wsgi:error] Traceback (most recent call last):
[wsgi:error] File "/home/stockenv/lib/python3.8/site-packages/fake_useragent/utils.py", line 154, in load
[wsgi:error] for item in get_browsers(verify_ssl=verify_ssl):
[wsgi:error]  File "/home/stockenv/lib/python3.8/site-packages/fake_useragent/utils.py", line 99, in get_browsers
[wsgi:error]     html = html.split('<table class="w3-table-all notranslate">')[1]
[wsgi:error] IndexError: list index out of range

我完全不明白这个错误!

标签: djangoapache2mod-wsgi

解决方案


推荐阅读