Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add show_error flag to display error in cell output #9430

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

bijanvakili
Copy link
Contributor

@bijanvakili bijanvakili commented Feb 13, 2025

For #9370

This is a smaller-scoped fix to propagate Javascript errors so that they are immediately visible in a python notebook.
The intent is to make it easier to iterate on errors or collect information for bugs.

Background

This is a short term fix for issue #9370 until the refactor suggested in #9064 is completed.

Change List

  • Add new onError handler to determine whether to show a deck.gl error in the HTML output or via the browser console
  • Optionally hook the Deck.onError handler and the createDeck exception handler catch block to call the new onError handler.
  • Add show_error boolean flag to instruct pydeck.Deck to display the error immediately instead of logging it to the developer console

NOTE: This does not raise a python exception from Deck.to_html(). The method still considers its execution as succeeded.

When show_error is True, the resulting output should look similar to the following screenshot:

pydeck_9370_sample

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.

2 participants