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

[Bug]: teal fails if the teal_data has no code #972

Closed
3 tasks done
averissimo opened this issue Nov 22, 2023 · 0 comments · Fixed by insightsengineering/teal.data#197
Closed
3 tasks done

[Bug]: teal fails if the teal_data has no code #972

averissimo opened this issue Nov 22, 2023 · 0 comments · Fixed by insightsengineering/teal.data#197
Assignees
Labels
bug Something isn't working core

Comments

@averissimo
Copy link
Contributor

What happened?

Can't start a teal application without code in teal_data() call

Reproducible example with latest from main

app <- teal::init(
  data = teal_data(IRIS = iris),
  modules = list(example_module())
) |>
  shiny::runApp()
#> Warning in teal.data:::get_code_dependency(attr(datasets, "preprocessing_code"),  :
#>   Objects not found in 'qenv' environment: IRIS
#> Warning: Error in code_dependency: The 'expression' code input does not contain 'srcref' attribute.
#>   1: shiny::runApp
#> 

Doesn't fail (but gives 2 warnings)

app <- teal::init(
    data = teal_data(IRIS = iris, code = ""),
    modules = list(example_module())
) |>
    shiny::runApp()
#> Warning in teal.data:::get_code_dependency(attr(datasets, "preprocessing_code"),  :
#>   Objects not found in 'qenv' environment: IRIS
#> Warning in teal.data:::get_code_dependency(attr(datasets, "preprocessing_code"),  :
#>   Objects not found in 'qenv' environment: IRIS
#> 

sessionInfo()

No response

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines.

Security Policy

  • I agree to follow this project's Security Policy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working core
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants