Skip to content

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

@jcheng5

Description

@jcheng5

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions