-
Notifications
You must be signed in to change notification settings - Fork 239
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
error when running a tutorial #169
Comments
I have the same issue with my adventr package of tutorials. Had email from someone getting this same error. Based on some previous stuff I found I went to re-knit the html for each tutorial, but they're not running and I get the same error as above. Was working fine before I updated to R 3.5.1. I use these tutorials to teach so any help before september is very gratefully received.
sessionInfo:
|
@rich-iannone It's possible that our update of font-awesome might have caused a problem here (although as far as I know re-knitting should always fix these types of errors). Could you try creating a tutorial with the older version of R Markdown that uses older Font Awesome then upgrading and see what happens? @jcheng5 As far as I know re-knitting should fix this but @profandyfield reports that it didn't in his case. |
I've just tried re-rendering a tutorial using rmarkdown version 1.9 and it renders fine - error is gone. Tried rendering the same tutorial under rmarkdown 1.10 and the error is back. |
@rich-iannone we should be able to repro this then. @profandyfield Can you provide a minimal version of the tutorial that repros the problem? |
Ok, so while trying to create a stripped down version of one of the tutorials I discovered that if I re-render (rmarkdown 1.10) the tutorial without editing (which is what I had been doing because I don't need to edit them) then I get the error. If I edit (for example delete a character then type it again so that the .Rmd has to save before rendering) the error goes away and it renders. I tried on a different tutorial within the same package and exactly the same. Are there any plans to stop the need to re-render (or indeed edit and re-render) every time R updates. I had a similar issue last time R updated - I had to manually re-render the 16 tutorials in my package so that they'd work for anyone using the most recent R. I mean, that's fine, but there are more productive ways to spend half and hour. Failing that, is there a way to batch render tutorials that are hosted within a package? (a sort of 'render all' command)? |
Ah, that makes perfect sense! (as we only re-render when the Rmd changes). Removing the .html file will also work. What we really need to do is save the versions of all packages that we draw dependencies from and then automatically re-render when any of those versions changes. |
FWIW I bumped into this when trying to re-render the sandbox tutorial |
I have read your book An adventure in statistics . The reason I stumbled on this issue is because I am trying to start the adventr tutorials. Edit: I see that you committed new HTML files. It seems to work: thank you! |
great - thanks for letting me know it now works! Hope you find the tutorials useful. andy |
Hello all,
Tutorials 1, 2, 3 works fine, but from 04 on the same error occur. How can I fix this? |
I don't think this is a learnr issue, so I've reposted here |
@jjallaire Do you plan to commit re-rendered html using rmarkdown 1.10? I gather from the discussion above that this may solve the problem when running |
@schloerke Could you do this? |
@jjallaire Sure. I'll re-run the learnr tutorials and add a note in the news for others to do the same. |
I believe it involves more than just a re-render of the documents. As now users with rmarkdown v1.9 will have issues with pre-rendered rmarkdown v1.10 documents. (Confirmed on my machine.) @jjallaire Is there any location in the shiny-prerendered output that contains the rmarkdown version, similar to how roxygen does with man files? If not, we could also look into having the rmarkdown version put into a meta field in the |
@schloerke There isn't anywhere right, but there are lots of places where structured metadata is written so we should be able to accommodate that info. Here you can see we serialize the HTML dependencies for the document: https://github.com/rstudio/learnr/blob/master/inst/tutorials/hello/hello.html#L68-L72 So there is a general mechanism for writing and reading JSON from within the HTML. Incidentally, I think some of the problem with version instability is caused by the fact that when we save HTML dependencies we save the path to the dependency within the package (and that path in turn often includes a version number). I think to really root out all of these problems we need to be able to serialize dependencies in a way that's directory name independent. |
@jjallaire Have addressed the issue in rstudio/rmarkdown#1420. Talking with @jcheng5 , we think it would be a good idea to inspect the document and force a new render if the utilized packages within the file are different from what the user has installed as well. Such as Seem like a good check to add? |
I agree about re-rendering when the utilized packages change. |
ERROR: Couldn't normalize path in `addResourcePath`, with arguments: `prefix` = 'font-awesome-4.5.0'; `directoryPath` = '' Intento 1, según lo visto en rstudio/learnr#169
…, shiny-prerendered document (#1420) Fixes rstudio/learnr#169
The problem should be gone with |
|
So I know this issue is closed, but I am having exactly the same problem as described by @otuz1 and @profandyfield when I try to load the "adventr" tutorials. I have the latest dev versions of rmarkdown and learnr. I'm really looking forward to the adventr tutorials and would appreciate a solution. Thanks! |
@cadlam Can you paste in your whole error message below? And also |
@schloerke My apologies it works now after restarting RStudio. Installing the dev version of learnr must have done the trick after all. |
Locking issue. Please open a new issue and reference this one in your description |
…, shiny-prerendered document (rstudio#1420) Fixes rstudio/learnr#169
I am new to R. I am trying to follow a tutorial for R.
After I load the learnr package with library(learnr), I try to run a tutorial with learnr::run_tutorial("hello", package="learnr"), I get the following error in my console:
At the same time a page is opened on http://127.0.0.1:5950/ displaying the following error:
How can I fix this?
The text was updated successfully, but these errors were encountered: