kinde-starter-kits / python-starter-kit

Starter kit to get going with Python
MIT License
13 stars 5 forks source link

Bug: Button "Helper funcions" from Python Starter Kit does does not work #16

Open douglasdcm opened 2 months ago

douglasdcm commented 2 months ago

Prerequisites

Describe the issue

I'm setting up a Python application using the Starter Kit. It worked fine after do the steps from this issue https://github.com/kinde-starter-kits/python-starter-kit/issues/15.

Screenshot from 2024-04-23 00-04-15

But the "Helper functions" button redirects to a Internal Server Error page. The log printed in my terminal is the following.

[2024-04-23 00:21:54,608] ERROR in app: Exception on /helpers [GET]
Traceback (most recent call last):
  File "/home/douglas/repo/python-starter-kit/venv/lib/python3.11/site-packages/flask/app.py", line 2525, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/douglas/repo/python-starter-kit/venv/lib/python3.11/site-packages/flask/app.py", line 1822, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/douglas/repo/python-starter-kit/venv/lib/python3.11/site-packages/flask/app.py", line 1820, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/douglas/repo/python-starter-kit/venv/lib/python3.11/site-packages/flask/app.py", line 1796, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/douglas/repo/python-starter-kit/app.py", line 118, in get_helper_functions
    data["flag"] = kinde_client.get_flag("theme")
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/douglas/repo/python-starter-kit/venv/lib/python3.11/site-packages/kinde_sdk/kinde_api_client.py", line 171, in get_flag
    raise KindeRetrieveException(
kinde_sdk.exceptions.KindeRetrieveException: Flag theme was not found, and no default value has been provided
127.0.0.1 - - [23/Apr/2024 00:21:54] "GET /helpers HTTP/1.1" 500 -

I tried to add a "theme" feature flag in my application using the Kinde UI in [My Application] > Releases > Feature flags to check if the issue was fixed, but the flag is not added. The spin icon close to Cancel button runs forever.

Screenshot from 2024-04-23 00-23-50

Starter kit URL

https://github.com/kinde-starter-kits/python-starter-kit

Operating system(s)

Ubuntu

Operating system version(s)

Ubuntu 20.04.6 LTS

Further environment details

Firefox 124.0.2 (64-bit)

Reproducible test case URL

No response

Additional information

No response