Skip to content

Dash for R should more robustly assert that output is a named list #181

Open

Description

@rpkyle

Currently, app developers can write a callback as follows, which will be evaluated:

            app$callback(
              output("slider-output", "children"),
              list(input("slider-input", "value")),
              function(value) {
                return(sprintf("You have chosen %s on the slider above.", value))
              }
            )

However, the following (confusing) error may appear in the R console if another app remains loaded within a browser tab, resulting in continued requests to the backend, even though the callback map is properly populated:

error: Couldn't find output component.

Please let us know about this error via https://github.com/plotly/dashR/issues/new
request: 127.0.0.1 - ID_127.0.0.1 [24/Feb/2020:09:04:09 -0500] "POST /_dash-update-component HTTP/1.1" 500 0 "http://127.0.0.1:8050/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36"

We should probably handle this situation by adding a check to verify that a requested ID is within the callback map, and return a helpful message indicating that it does not exist when absent. This check could be performed for both the R and Python backends, as it does not currently exist for either.

Activity

  1. added this to the Dash Q1/2020 milestone on Feb 24, 2020
  2. self-assigned this
    on Feb 24, 2020
  3. changed the title [-]Dash for R should assert that `output` is a named list[/-] [+]Dash for R should more robustly assert that `output` is a named list[/+] on Feb 24, 2020
  4. removed their assignment
    on May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions