django - 使用 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
我完全不明白这个错误!
解决方案
推荐阅读
- tcp - Wireshark 不捕获网络层以上的数据包
- c# - 使用 EF Core 5 的 Direct 和 Indirec 多对多配置
- latex - 在 LaTeX 的 Memoir 类中使用 \chapterstyle{article} 时如何抑制页面弹出?
- docker - docker 共享卷未传播
- django - 扩展 Django-Oscar 的 layout.html 的问题
- python-3.8 - 导入模块时未调用 __init__.py
- python - 尝试根据列上的某些条件从熊猫数据框中删除一行
- vba - Microsoft Access - 无法初始化数据提供程序
- visual-studio-code - VSCode重复任务但更改参数
- marklogic - 在 Marklogic 中选择 FileSystem 和选择 Modules 数据库之间的区别