I\'m pretty new in fastapi (so in python too) and got such problem. I have a file which is just an entry point, and whole logic is working ok (when I start server it works as I