Skip to content

Access from other than localhost #3832

Answered by lukeer
lukeer asked this question in Q&A
Discussion options

You must be logged in to vote

Working on this on windows in Visual Studio Code. Nearly a year after above question, I finally found the solution to it:
Make sure that the socketio.run() call actually gets executed.

For reasons I don't remember now, I was used to start the application this way:

winpty python -m app.py

And since the socketio.run() call is enclosed in python's

if __name__ == "__main__":
   ...

It is not executed. The web server still worked since Flask does some magic on its own. Changing the call to

winpty python app.py

did the trick.

2nd problem: Get this to work in a debugging environment.
Here, the name check fails again because Visual Studio Code calls something called "launcher" with a bunch of …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lukeer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant