Black Lives Matter. Please consider donating to Black Girls Code today.

Error while Running App on Chrome Brwoser

I’m trying hard to run one of the tutorials from plotly dash. Whenever I run the code in Spyder, and then I open the on google chrome, it never runs the app. I tried so many solutions from the various platforms but still struggling.
I would appreciate your help in this regard.


Please post the pic of your error or you code, so that i can help you better :slight_smile:

On Line 6 change app = dash.Dash(name)
still you face the same error then change the line 34


I tried it…still not working.

I don’t see anything obviously wrong (though assuming you’re on dash version >= 1.0 you don’t need the serve_locally lines, that’s the default now).

But at the end of the console it says “An exception has occured, use %tb to see the full traceback” - can you do that? Presumably that will help us see what went wrong.

Traceback (most recent call last):

File “”, line 1, in
runfile(‘C:/Users/atunk/Documents/Python Scripts/Test/’, wdir=‘C:/Users/atunk/Documents/Python Scripts/Test’)

File “C:\Users\atunk\Anaconda3\lib\site-packages\spyder_kernels\customize\”, line 827, in runfile
execfile(filename, namespace)

File “C:\Users\atunk\Anaconda3\lib\site-packages\spyder_kernels\customize\”, line 110, in execfile
exec(compile(, filename, ‘exec’), namespace)

File “C:/Users/atunk/Documents/Python Scripts/Test/”, line 21, in
app.run_server(debug=True, host=‘’,port=8003)

File “C:\Users\atunk\Anaconda3\lib\site-packages\dash\”, line 1829, in run_server, debug=debug, **flask_run_options)

File “C:\Users\atunk\Anaconda3\lib\site-packages\flask\”, line 990, in run
run_simple(host, port, self, **options)

File “C:\Users\atunk\Anaconda3\lib\site-packages\werkzeug\”, line 1008, in run_simple
run_with_reloader(inner, extra_files, reloader_interval, reloader_type)

File “C:\Users\atunk\Anaconda3\lib\site-packages\”, line 339, in run_with_reloader

The above error appears after %tb.

Hmm, does look spyder might not work well with hot reloading as @bala_bala implied. In addition to the option he mentioned, we have another piece of hot reloading (for js, css, etc) that you might try turning off:

app.run_server(debug=True, use_reloader=False, dev_tools_hot_reload=False)

I’m not real familiar with spyder though, anyone else know what’s going on here? Worst case you can run the app from a separate terminal window, though that’s obviously not ideal.

Thanks for your input. I’m only able to run the app via jupyter.
One more query, I have to change every time the port=xxxx, otherwise it only runs the preveous app with that port. I meant I can’t run two different apps with the same port like port=8080.

You want to run two apps simultaneously on the same port? You’d have to put them on the same flask server with different prefixes, or put another server in front. There have been some discussions about that like Hosting multiple Dash apps with uWSGI + Nginx (but note the API has evolved since then)

If you mean you’re done with one app and want to run another on the same port, I’ve only seen that mean the previous app is still running - you just have to ensure it’s really stopped before starting the second one.

Happy to help sort it out if you can give some more details about the symptoms you’re seeing.

dash error as follows:
Running on
Debugger PIN: 103-292-731
Traceback (most recent call last):
File “C:/Users/manish.podugu/AppData/Local/Programs/Python/Python37/”, line 35, in
File “C:\Users\manish.podugu\AppData\Local\Programs\Python\Python37\lib\site-packages\dash\”, line 2026, in run_server, debug=debug, **flask_run_options)
File “C:\Users\manish.podugu\AppData\Local\Programs\Python\Python37\lib\site-packages\flask\”, line 985, in run
cli.show_server_banner(self.env, self.debug,, False)
File “C:\Users\manish.podugu\AppData\Local\Programs\Python\Python37\lib\site-packages\flask\”, line 670, in show_server_banner
File “C:\Users\manish.podugu\AppData\Local\Programs\Python\Python37\lib\site-packages\click\”, line 218, in echo
file = _default_text_stdout()
File “C:\Users\manish.podugu\AppData\Local\Programs\Python\Python37\lib\site-packages\”, line 675, in func
rv = wrapper_func()
File “C:\Users\manish.podugu\AppData\Local\Programs\Python\Python37\lib\site-packages\”, line 436, in get_text_stdout
rv = _get_windows_console_stream(sys.stdout, encoding, errors)
File “C:\Users\manish.podugu\AppData\Local\Programs\Python\Python37\lib\site-packages\”, line 295, in _get_windows_console_stream
func = _stream_factories.get(f.fileno())
io.UnsupportedOperation: fileno

It is not recommended to run Dash with Spyder, but it can be done.

Instead app.run_server, Try:

server = flask.Flask(__name__)
app = dash.Dash(__name__, server = server,])