"Connection Reset By Peer" on Minimal App

I’ve copy pasted the “Minimal App” example (https://dash.plotly.com/minimal-app) to my local machine, but when I try to run it, I get the following error:

ConnectionResetError: [Errno 104] Connection reset by peer

There is no other output, so I can’t tell what port Dash is trying to access.

Could you give some more info on how you’re running the example?

I think that error is showing in the browser. If you’re on Windows and run it, say, in a Powershell (other and much better options are available), you should see more messages in the Powershell window, including what port it is using.

Hi @slpyshti
Do you have any firewall set up? That might be blocking it?

Figured it out! Was because I was trying to read the github data in the example from a remote server.

2 Likes

Hello

If you’re encountering a ConnectionResetError with the “Minimal App” example, try these steps:

Port Conflict: Ensure no other application is using port 8050. You can change it in the code: app.run_server(debug=True, port=8051).

Check Installation: Make sure Dash is installed correctly. Reinstall with:

pip install dash –upgrade

· Firewall Settings: Check if a firewall is blocking the connection and temporarily disable it to test.

· Environment Setup: Use a virtual environment to manage dependencies:

python -m venv dash_env source dash_env/bin/activate # On Windows, use dash_env\Scripts\activate pip install dash

Verify Code: Double-check that your code matches the example and has no errors.

Here’s the basic “Minimal App” code for reference:

import dash import dash_core_components as dcc import dash_html_components as html app = dash.Dash(name) app.layout = html.Div(children=[ html.H1(children=‘Hello Dash’), html.Div(children=‘Dash: A web application framework for Python.’), dcc.Graph( id=‘example-graph’, figure={ ‘data’: [{‘x’: [1, 2, 3, 4, 5], ‘y’: [4, 1, 3, 5, 2], ‘type’: ‘line’, ‘name’: ‘Data 1’}], ‘layout’: {‘title’: ‘Dash Data Visualization’} } ) ]) if name == ‘main’: app.run_server(debug=True)

Hope it helps! :slightly_smiling_face: