** 更新 18.08.21:今天再次运行我的代码后,我不再收到警告错误。我也意识到我的代码中有一个错误导致链接不起作用!可能值得重新运行您的代码并查看警告消息是否也为您消失了。**
*我仍然在处理事情(因此在 CS50 课程上!),如果这不是那么有帮助,我深表歉意。但我也有一个非常相似的问题——我在休息大约一个月后回来拍摄我的最终项目视频,现在由于我的商店页面上的链接不再加载页面,我无法访问我网站的一半。我也收到了类似的错误信息:
WARNING: Exception raised while handling cache file '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/cachelib/file.py", line 162, in get
with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
INFO: 192.168.24.92 - - [17/Aug/2021 19:58:30] "GET / HTTP/1.0" 200 -
WARNING: Exception raised while handling cache file '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/cachelib/file.py", line 162, in get
with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
INFO: 192.168.24.92 - - [17/Aug/2021 19:58:31] "GET /static/styleshomepage.css HTTP/1.0" 200 -
WARNING: Exception raised while handling cache file '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/cachelib/file.py", line 162, in get
with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
WARNING: Exception raised while handling cache file '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/cachelib/file.py", line 162, in get
with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
INFO: 192.168.18.228 - - [17/Aug/2021 19:58:31] "GET /static/jskname.png HTTP/1.0" 200 -
INFO: 192.168.24.92 - - [17/Aug/2021 19:58:31] "GET /static/loading.js HTTP/1.0" 200 -
WARNING: Exception raised while handling cache file '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/cachelib/file.py", line 162, in get
with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
WARNING: Exception raised while handling cache file '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/cachelib/file.py", line 162, in get
with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
我注意到最近在 IDE 中安装了新版本的 Python(Python 3.9.6),并想知道这是否会导致我们在某个地方的链中断?但我似乎无法在谷歌上找到这方面的迹象。认为值得分享的是您的问题可能不是孤立的。我会继续搜索,如果你碰巧弄明白了,我会感谢你的解决方案!
杰斯*