if __name__ == "__main__": not working. #275
-
I was trying out the authentication example. I noticed the program did not have but rather just ui.run() If I change it to if __name__ == "__main__":
ui.run() It breaks. Could someone explain why?
|
Beta Was this translation helpful? Give feedback.
Answered by
falkoschindler
Jan 20, 2023
Replies: 1 comment
-
This has been discussed here #181 and here #252. A workaround is to use if __name__ in {"__main__", "__mp_main__"}: or simply no main guard at all as in the examples. Besides that we are still looking for a solution to either support a regular main guard or at least to improve the error message. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
falkoschindler
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This has been discussed here #181 and here #252.
A workaround is to use
or simply no main guard at all as in the examples.
Besides that we are still looking for a solution to either support a regular main guard or at least to improve the error message.