Skip to content

[WIP] Dash Dev Tools -- backend - #307

Closed
rmarren1 wants to merge 4 commits into
plotly:masterfrom
rmarren1:500
Closed

rmarren1 wants to merge 4 commits into
plotly:masterfrom
rmarren1:500

Conversation

@rmarren1

@rmarren1 rmarren1 commented Jul 29, 2018 •

Copy link
Copy Markdown
Contributor

This solution uses the flask got_request_exception method to call a block of code before an exception is raised in the Dash backend when debug=True. In this block of code, we use socket.io (Flask-SocketIO) to emit an 'error' event from the namespace /{prefix}_dash-errors endpoint which includes error information like the Exception name, message, and traceback.

Still need to figure out:

  • socket.io prints logs every couple of seconds which is annoying, can't figure out how to turn them off.
  • does wrapping the server in a SocketIO instance in this line: socketio = SocketIO(self.server) break anything in servers which use Dash plus some other Flask plugins?

@rmarren1 rmarren1 changed the title Dash Dev Tools -- backend [WIP] Dash Dev Tools -- backend Jul 29, 2018
@rmarren1 rmarren1 mentioned this pull request Jul 30, 2018
@rmarren1

rmarren1 commented Aug 2, 2018

Copy link
Copy Markdown
Contributor Author

Closing in favor of catching exceptions in the front-end. In this solution, the error data transferred over to the front-end was the input to the flask exception handler rather than the output, so we did not get the nice werkzueg error pages.

@rmarren1 rmarren1 closed this Aug 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant