dash icon indicating copy to clipboard operation
dash copied to clipboard

Truncate `InvalidCallbackReturnValue` size

Open stdedos opened this issue 2 years ago • 4 comments

Truncate the stringified value of bad_val, in order to avoid excessive output on the debug pop-up.

Fixes https://github.com/plotly/dash/issues/2658

Signed-off-by: Stavros Ntentos [email protected]

stdedos avatar Oct 12 '23 12:10 stdedos

Looks great, thanks! Would you mind adding a test in test_devtools_error_handling, perhaps modeled off dveh003, where a callback returns a very long value that gets truncated? (No need for the percy snapshot though, just validate the contents of the error

After that, just a changelog entry - make a new ## Unreleased -> ## Fixed section at the top if necessary.

alexcjohnson avatar Oct 12 '23 16:10 alexcjohnson

hi @stdedos Thank you for creating this pull request. We wanted to follow up and encourage you to finalize this PR by adding a test. In case it's helpful, here is an example of a basic Dash test.

Coding-with-Adam avatar Nov 06 '23 17:11 Coding-with-Adam

Hello there, both!

I don't think it's feasible for me to do testing for this PR.

It was not a commitment discussed in https://github.com/plotly/dash/issues/2658. Furthermore, testing dash is problematic for me from start to finish 😓

  1. Local testing is impossible to start
  2. I cannot find good instructions
  3. REPL via CI is too slow

I do not want to spend more headaches trying to bootstrap testing something otherwise easy to spot as working.

stdedos avatar Nov 14 '23 09:11 stdedos

Thanks for giving it a shot @stdedos - sorry to hear it's not working. We'll find a time to finish it up at some point.

alexcjohnson avatar Nov 14 '23 18:11 alexcjohnson