Birdbh / Engicoders

COSC 310 Project
0 stars 0 forks source link

Bug needs to be fixed when a non-premium user tries to select data from Thinkspeak API. #232

Closed Birdbh closed 7 months ago

Birdbh commented 7 months ago

Error: 'NoneType' object is not subscriptable 127.0.0.1 - - [01/Apr/2024 08:48:30] "GET / HTTP/1.1" 302 - 'NoneType' object is not subscriptable 127.0.0.1 - - [01/Apr/2024 08:48:30] "GET /home HTTP/1.1" 200 - 127.0.0.1 - - [01/Apr/2024 08:48:30] "GET /static/style.css HTTP/1.1" 304 - 'NoneType' object is not subscriptable [2024-04-01 08:48:38,836] ERROR in app: Exception on /home [POST] Traceback (most recent call last): File "C:\Users\birdl\anaconda3\envs\COSC310\Lib\site-packages\flask\app.py", line 2525, in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\birdl\anaconda3\envs\COSC310\Lib\site-packages\flask\app.py", line 1822, in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\birdl\anaconda3\envs\COSC310\Lib\site-packages\flask\app.py", line 1820, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\birdl\anaconda3\envs\COSC310\Lib\site-packages\flask\app.py", line 1796, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\birdl\Desktop\Year 4\Term 2\COSC 310\Workspace\Engicoders\src\flaskr\routing.py", line 74, in home date_series, value_series = form.get_time_series_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\birdl\Desktop\Year 4\Term 2\COSC 310\Workspace\Engicoders\src\flaskr\home.py", line 39, in get_time_series_data if self.file.data.filename != '': ^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'filename'