Describe the bug
I'm getting the following error when trying to open the link
$ python3 main.py
* Serving Flask app 'main'
* Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:8080
* Running on http://192.168.1.132:8080
Press CTRL+C to quit
[2023-09-22 03:59:57,400] ERROR in app: Exception on / [GET]
Traceback (most recent call last):
File "/home/guy/.local/lib/python3.11/site-packages/flask/app.py", line 2190, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/guy/.local/lib/python3.11/site-packages/flask/app.py", line 1487, in full_dispatch_request
return self.finalize_request(rv)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/guy/.local/lib/python3.11/site-packages/flask/app.py", line 1508, in finalize_request
response = self.process_response(response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/guy/.local/lib/python3.11/site-packages/flask/app.py", line 2002, in process_response
response = self.ensure_sync(func)(response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/guy/workspace/instagraph/main.py", line 66, in add_header
if check_if_free_plan():
^^^^^^^^^^^^^^^^^^^^
File "/home/guy/workspace/instagraph/main.py", line 61, in check_if_free_plan
return user_plan == 'free'
^^^^^^^^^
NameError: name 'user_plan' is not defined
[2023-09-22 03:59:57,400] ERROR in app: Request finalizing failed with an error while handling an error
Traceback (most recent call last):
File "/home/guy/.local/lib/python3.11/site-packages/flask/app.py", line 2190, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/guy/.local/lib/python3.11/site-packages/flask/app.py", line 1487, in full_dispatch_request
return self.finalize_request(rv)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/guy/.local/lib/python3.11/site-packages/flask/app.py", line 1508, in finalize_request
response = self.process_response(response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/guy/.local/lib/python3.11/site-packages/flask/app.py", line 2002, in process_response
response = self.ensure_sync(func)(response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/guy/workspace/instagraph/main.py", line 66, in add_header
if check_if_free_plan():
^^^^^^^^^^^^^^^^^^^^
File "/home/guy/workspace/instagraph/main.py", line 61, in check_if_free_plan
return user_plan == 'free'
^^^^^^^^^
NameError: name 'user_plan' is not defined
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/guy/.local/lib/python3.11/site-packages/flask/app.py", line 1508, in finalize_request
response = self.process_response(response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/guy/.local/lib/python3.11/site-packages/flask/app.py", line 2002, in process_response
response = self.ensure_sync(func)(response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/guy/workspace/instagraph/main.py", line 66, in add_header
if check_if_free_plan():
^^^^^^^^^^^^^^^^^^^^
File "/home/guy/workspace/instagraph/main.py", line 61, in check_if_free_plan
return user_plan == 'free'
^^^^^^^^^
NameError: name 'user_plan' is not defined
127.0.0.1 - - [22/Sep/2023 03:59:57] "GET / HTTP/1.1" 500 -
To Reproduce
Steps to reproduce the behavior:
Run python3 main.py
Click on one of the links
Desktop (please complete the following information):
OS: Ubuntu 23.04
Browser Firefox
Version 117.01
Additional context
Add any other context about the problem here.
Describe the bug I'm getting the following error when trying to open the link
To Reproduce Steps to reproduce the behavior:
python3 main.py
Desktop (please complete the following information):
Additional context Add any other context about the problem here.