Stopping script with Ctrl+C in the console is not working
See original GitHub issueHi 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
Issue Analytics
- State:
- Created 5 years ago
- Comments:18 (12 by maintainers)
Top Results From Across the Web
Ctrl+C does not stop script in Console? - SAPIEN Forums
PowerShell Version: 4.0. When script is running in Console, sometimes I wanted to stop it from running. But Ctrl+C won't work?
Read more >Node JS ctrl + C doesn't stop server (after starting server with ...
I was trying to get json-server to quit a custom server script, but it always left a child process running on Windows.
Read more >CTRL+C and CTRL+BREAK Signals - Windows Console
Normal CTRL+C processing is restored by calling SetConsoleCtrlHandler with NULL and FALSE values. This attribute of ignoring or not ignoring ...
Read more >What to do when Ctrl-C won't kill running job? - Ask Ubuntu
Send the SIGQUIT signal with Ctrl + \ . .. $ sleep 10 ^\Quit. → This is equivalent to kill -3 pid ....
Read more >MySQL console: Ctrl+C driving me nuts
Isn't this potentially dangerous? There's no guarantee that it would work for future versions. Plus, it looks like it'd work, but how would...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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:
KeyboardInterruptError
Python-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.
@SwethA99hub , could you run
jupyter qtconsole
in your working environment and try to reproduce your issue in there? What about if you runipython
?