anilabhadatta / educative-viewer

Python-flask based web-app to view courses scraped using educative.io-scraper
MIT License
53 stars 17 forks source link

Getting Nonetype error while accessing current_path_details.last_visited_directory. #19

Open ijmondal opened 1 week ago

ijmondal commented 1 week ago

I get this error while trying to access lessons

127.0.0.1 - - [01/Jul/2024 00:36:44] "POST /edu-viewer/courses HTTP/1.1" 302 - [2024-07-01 00:36:44,500] ERROR in app: Exception on /edu-viewer/courses/000-overview [GET] Traceback (most recent call last): File "/opt/homebrew/lib/python3.9/site-packages/flask/app.py", line 1463, in wsgi_app response = self.full_dispatch_request() File "/opt/homebrew/lib/python3.9/site-packages/flask/app.py", line 872, in full_dispatch_request rv = self.handle_user_exception(e) File "/opt/homebrew/lib/python3.9/site-packages/flask/app.py", line 870, in full_dispatch_request rv = self.dispatch_request() File "/opt/homebrew/lib/python3.9/site-packages/flask/app.py", line 855, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] File "/opt/homebrew/lib/python3.9/site-packages/flask_login/utils.py", line 290, in decorated_view return current_app.ensure_sync(func)(*args, **kwargs) File "/Users/indro/code/educative-viewer/main.py", line 134, in topics course_dir = current_path_details.last_visited_directory AttributeError: 'NoneType' object has no attribute 'last_visited_directory' 127.0.0.1 - - [01/Jul/2024 00:36:44] "GET /edu-viewer/courses/000-overview HTTP/1.1" 500 - 127.0.0.1 - - [01/Jul/2024 00:36:44] "GET /favicon.ico HTTP/1.1" 404 - 127.0.0.1 - - [01/Jul/2024 00:36:47] "POST /edu-viewer/courses HTTP/1.1" 302 - [2024-07-01 00:36:47,202] ERROR in app: Exception on /edu-viewer/courses/005-inheritance [GET] Traceback (most recent call last): File "/opt/homebrew/lib/python3.9/site-packages/flask/app.py", line 1463, in wsgi_app response = self.full_dispatch_request() File "/opt/homebrew/lib/python3.9/site-packages/flask/app.py", line 872, in full_dispatch_request rv = self.handle_user_exception(e) File "/opt/homebrew/lib/python3.9/site-packages/flask/app.py", line 870, in full_dispatch_request rv = self.dispatch_request() File "/opt/homebrew/lib/python3.9/site-packages/flask/app.py", line 855, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] File "/opt/homebrew/lib/python3.9/site-packages/flask_login/utils.py", line 290, in decorated_view return current_app.ensure_sync(func)(*args, **kwargs) File "/Users/indro/code/educative-viewer/main.py", line 134, in topics course_dir = current_path_details.last_visited_directory AttributeError: 'NoneType' object has no attribute 'last_visited_directory' 127.0.0.1 - - [01/Jul/2024 00:36:47] "GET /edu-viewer/courses/005-inheritance HTTP/1.1" 500 -

image

Can you tell me what am I doing wrong. I followed all the readme instructions.

anilabhadatta commented 1 week ago

Create a video and attach it here @ijmondal