I'm trying to build an API and I'm using swagger editor, swagger gen and swagger UI. I have a YAML file from swagger editor, and I generated a python-flask server, I ran the server and it worked fine, the problem is on my page I have a few endpoints when I want to try the endpoint I just press try it now button on the page and press execute and this is the response I keep getting (https://i.stack.imgur.com/vm0rH.png)
what the response should be (https://i.stack.imgur.com/gKm9i.png)
till now I didn't perform any logic for it i'm just trying to print on the server response but i keep getting the same error message
when I figured it out it was because of an error on the controller function of that specific endpoint, and this is what I have tried to print but I keep getting the same error above, i know it's because of that endpoint function but I don't know what exactly (https://i.stack.imgur.com/bMKU4.png)
and this what I'm getting on the terminal [error on the terminal]
i even have tried this but same error second try
any solutions? or why is this happening