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

Implicit www static dir for Shiny Express doesn't work on shinyapps.io/connect #1440

Closed
jcheng5 opened this issue May 31, 2024 · 0 comments · Fixed by #1442
Closed

Implicit www static dir for Shiny Express doesn't work on shinyapps.io/connect #1440

jcheng5 opened this issue May 31, 2024 · 0 comments · Fixed by #1442

Comments

@jcheng5
Copy link
Collaborator

jcheng5 commented May 31, 2024

Create any Shiny Express app.py, and put a www directory next to it with some trivial contents.

shiny run shiny.express.app:app_2e_py

Results in this error:

ValueError: static_assets must be an absolute path: "www". Consider using one of the following instead:
  os.path.join(os.path.dirname(__file__), "www")  OR  pathlib.Path(__file__).parent/"www"

which is what you get on shinyapps.io. However, shiny run app.py works just fine.

The problem seems to be that shiny.express._run.wrap_express_app() takes a file argument that can be relative. I think that should be coerced to an absolute (file = file.absolute()) right at the top of the function body.

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 a pull request may close this issue.

1 participant