Closed bleonard314 closed 1 year ago
Hmm, I'm not able to replicate the issue. How are you running the application?
I'm running it through VS Code using the Shiny plug-in. I'll try cloning the project and running it on another system from the command line to see if the same error occurs. Thanks!
Would be interesting to know whether you can reproduce that 404
by using shiny run app.py
from the command line...
Okay, just had time to try a fresh clone, create a venv, install packages from the requirements, and shiny run app.py
from the command line. Repeated this process on both my local Windows 10 machine and AVD. Received the same issue as before with the following log. Note that I am able to interact with the UI and select radio buttons, but am unable to view any UI outputs.
INFO: Started server process [16180]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: 127.0.0.1:52592 - "GET / HTTP/1.1" 200 OK
INFO: 127.0.0.1:52594 - "GET /require.min.js HTTP/1.1" 200 OK
INFO: 127.0.0.1:52592 - "GET /shiny.min.css HTTP/1.1" 200 OK
INFO: 127.0.0.1:52595 - "GET /shiny.js HTTP/1.1" 200 OK
INFO: 127.0.0.1:52596 - "GET /jquery-3.6.0.min.js HTTP/1.1" 200 OK
INFO: 127.0.0.1:52605 - "GET /bootstrap.bundle.min.js HTTP/1.1" 200 OK
INFO: 127.0.0.1:52606 - "GET /bootstrap.min.css HTTP/1.1" 200 OK
INFO: 127.0.0.1:52606 - "GET /favicon.ico HTTP/1.1" 404 Not Found
INFO: ('127.0.0.1', 52640) - "WebSocket /websocket/" [accepted]
INFO: connection open
INFO: 127.0.0.1:52606 - "GET /lib/ipywidget-libembed-amd-1.0.1%5Clibembed-amd.js HTTP/1.1" 404 Not Found
INFO: 127.0.0.1:52606 - "GET /lib/ipywidget-output-binding-0.1.4%5Coutput.js HTTP/1.1" 404 Not Found
The presence of the hex code %5C
makes me suspect that the issue may have to do with relative paths for windows vs. linux (backward vs. forward slash).
One more thing for debugging. Replacing %5C
with %2F
or /
locates these files. Perhaps a function like file.path
is being too smart and converting part of an HTML path to a windows file path.
http://127.0.0.1:8000/lib/ipywidget-libembed-amd-1.0.1%2Flibembed-amd.js
Okay, issue might actually have to do with htmltools
not this package and it may be an issue with normalizePath
not file.path
. See suspected lines of code below. Perhaps try explicitly state normalizePath(path, winslash = "/", mustWork = TRUE)
. I also see that there is a comment about dependency$name
needing to not have any slashes of either kind. Hopefully this is helpful, but I'm just shooting in the dark.
I am still facing the same issue how can I get it resolved
@Akshay-Kalwar Have you tried installing the latest version of htmltools (0.1.4)?
@Akshay-Kalwar Have you tried installing the latest version of htmltools (0.1.4)?
Sorry my bad its working now thank you
Description
I am trying to replicate the code examples provided and am able to
register
widgets without issue.https://github.com/rstudio/py-shinywidgets/blob/main/examples/ipyleaflet/app.py
However, I do not get an output from this code, even if I modify the code to replicate just the leaflet example.
https://github.com/rstudio/py-shinywidgets/blob/main/examples/outputs/app.py
I believe this may be related to the following message I receive when running the code this way:
"GET /lib/ipywidget-libembed-amd-1.0.1%5Clibembed-amd.js HTTP/1.1" 404 Not Found
What I Did