I made and exe file using pyinstaller and when I m trying to hide the console using --noconsole or -w then this command runs perfectly
pyinstaller --onefile --noconsole main.py
But after running the .exe file a error dialog appears with title Fatal error! With message main.exe returned -1