Я пытаюсь отладить приложение на сервере bokeh. В настоящее время я работаю с pdb, но не могу выйти из отладчика Python. Я получаю сообщение об ошибке при запуске команды "q".
'''
2019-05-10 22:08:08,123 WebSocket connection opened
2019-05-10 22:08:08,124 ServerConnection created
2019-05-10 22:08:08,182 Error thrown from periodic callback:
2019-05-10 22:08:08,192 Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tornado/gen.py", line 883, in callback
result_list.append(f.result())
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tornado/gen.py", line 1147, in run
yielded = self.gen.send(value)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/bokeh/server/session.py", line 70, in _needs_document_lock_wrapper
result = yield yield_for_all_futures(func(self, *args, **kwargs))
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/bokeh/server/session.py", line 191, in with_document_locked
return func(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/bokeh/document/document.py", line 1126, in wrapper
return doc._with_self_as_curdoc(invoke)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/bokeh/document/document.py", line 1112, in _with_self_as_curdoc
return f()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/bokeh/document/document.py", line 1125, in invoke
return f(*args, **kwargs)
File "/Users/user/git/my_app/my_app/smooth_simulation.py", line 399, in animate
filter.tree_filtering(z_list, R_list, t)
File "/Users/user/git/my_app/my_app/filter.py", line 489, in tree_filtering
max_node = self.leave_list[np.argmax([n.w for n in self.leave_list])]
File "/Users/user/git/my_app/my_app/filter.py", line 489, in tree_filtering
max_node = self.leave_list[np.argmax([n.w for n in self.leave_list])]
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/bdb.py", line 48, in trace_dispatch
return self.dispatch_line(frame)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/bdb.py", line 67, in dispatch_line
if self.quitting: raise BdbQuit
bdb.BdbQuit
'''
В настоящее время я просто использую это, чтобы обойти проблему, но это не совсем удобное решение.
'''
import signal; import os; os.kill(os.getpid(), signal.SIGKILL)
'''
Спасибо за помощь!