For some reason when I run my Dash app in VSCode in my .py file it is opening two tabs. One tab has my entire Dash app as it should normally appear. After making some selections and clicking a button to generate a graph, it generates the graph (expected) but then it opens a second tab with only the graph displayed, no other dash components. Now here’s the weird behavior.
I also have the same exact code in a .ipynb and upon startup of my machine, the .ipynb opens one tab as behaves completely normal. Once I open the .py file then it behaves oddly by opening the second tab with only the graph. If I go back to the .ipynb file it now opens two tabs rather than one as before. I then tried restarting the computer again and opened the .py file first and it still opens two tabs. The first tab opens in “http://127.0.0.1:8050/” as expected but the second window opens in “http://127.0.0.1:50969/” which is odd.
I did some digging and found that everyone had suggested using:
if __name__ == '__main__':
app.run_server(debug=True, use_reloader=False)
but I already had that in my code previously and it is still opening two tabs. I also tried setting debug=False and erasing the use_reloader statement and still no luck. Can anyone help or does someone know why this behavior is happening? I have never experienced this before with any other Dash app I have made.
If you guys like I can paste my app but I figure it may be unnecessary and it is around 335 lines of code.