Issue
I have finished my final project, a game website kind of thing that I used flask for. I finished this project around 2 months ago and I put off submitting it until now but as I went to make the video I realized my website was very slow. (The entire time I have been using the cs50 ide) And that a specific page wouldn't load up and the other pages were taking ages, so I deleted all the files in the "flask_sessions" as the sessions wouldn't affect the entire program if I deleted them. It worked but I couldn't get to the page that I couldn't get to before. I got these errors in the terminal where I ran my flask application.
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: '/home/ubuntu/FP/flask_session/a64629a7c4037bc0e4fc3f1900f2250a'
INFO: 192.168.40.114 - - [15/Aug/2021 08:45:34] "GET /home HTTP/1.0" 302 -
INFO: 192.168.40.114 - - [15/Aug/2021 08:45:36] "GET /login HTTP/1.0" 200 -
WARNING: Exception raised while handling cache file '/home/ubuntu/FP/flask_session/a64629a7c4037bc0e4fc3f1900f2250a'
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: '/home/ubuntu/FP/flask_session/a64629a7c4037bc0e4fc3f1900f2250a'
Any help is appreciated thanks!
Solution
** UPDATE 18.08.21: Having run my code again today, I am no longer getting the warning errors. I have also realised I had a mistake in my code which caused the links to not work! Might be worth re-running your code and seeing if the warning messages have gone for you also.**
*I'm still getting to grips with things (hence on the CS50 course!) so apologies if this isn't all that helpful. But I also have a very similar problem - I came back to film my final project video after about a months break and now cannot access half of my website as the links on my shop page no longer load the pages. I had a similar error message to yourself:
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'
I noticed the new version of Python (Python 3.9.6) was installed to the IDE recently, and wondered if that could have caused a break in a chain somewhere for us? But I can't seem to find an indication of this on google. Thought it was worth sharing that your problem may not be an isolated one. I'll keep googling, if you happen to figure it out I'd be grateful for your resolution! Jess*
Answered By - Jess Ketches
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.