Skip to content
Advertisement

Running FastAPI multiple process error after pyinstaller

I am running python FastAPI with UVICORN with multiple processors (5 processes),It is running smoothly from the code, but when I tried make the exe from pyinstaller and try to run the file, it is showing error.

filename: main.py

JavaScript

Output code from source

JavaScript

I make a single file using pyinstaller with the following command

JavaScript

and while running the main file using

JavaScript

get the following error

JavaScript

How to refer the main:app, what is the actual class name after installer is created? I read somewhere that we need to use like foldername.main:app , but that also not working

Advertisement

Answer

I tried your program and installing with

JavaScript

solved it for me.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement