spyder: Stopping script with Ctrl+C in the console is not working
Hi I am running the following dash script. Stopping the server with Ctrl-C in the console is not working on my Windows 10, Python 3.7.0 machine using spyder 3: ` # -- coding: utf-8 -- import dash import dash_core_components as dcc import dash_html_components as html
# external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
app = dash.Dash(__name__)
app.layout = html.Div(children=[
html.H1(children='Example Dash'),
html.Div(children='''
Dash: A web application framework for Python.
'''),
dcc.Graph(
id='example-graph',
figure={
'data': [
{'x': [1, 2, 3], 'y': [4, 1, 2], 'type': 'bar', 'name': 'SF'},
{'x': [1, 2, 3], 'y': [2, 4, 5], 'type': 'bar', 'name': u'Montréal'},
],
'layout': {
'title': 'Dash Data Visualization'
}
}
)
])
if __name__ == '__main__':
app.run_server()
` I replaced Version 3 by the development version 4 where Ctrl-C is working as expected.
Cheers Renger
About this issue
- Original URL
- State: open
- Created 8 years ago
- Comments: 18 (12 by maintainers)
I’m very much not a WSGI/web server expert, but if I were to guess, either one or both of the following may occurring:
KeyboardInterruptErrorPython-level exception, and instead of exiting, it instead relaunches new subprocesses in debug modeThen, when it is run again, it launches another set of them.