profandyfield / discovr

discovr package for R to accompany Discovering Statistics Using R and RStudio
131 stars 25 forks source link

tutorial fails to run #1

Closed poldrack closed 4 years ago

poldrack commented 4 years ago

Upon clicking the button to start tutorial 1, I get the following error:

$ exercise      : logi TRUE
 $ exercise.lines: num 4
  |..................                                                    |  25%
  ordinary text without R code
  |..................                                                    |  26%
label: met_name-hint-1
Quitting from lines 401-404 (discovr_01.Rmd) 
Error in eval(expr, envir, enclos) : object '.....' not found
Calls: sourceWithProgress ... handle -> withCallingHandlers -> withVisible -> eval -> eval
Execution halted

This is using the R 4.0.2 and RStudio 1.3.959 with all of the latest packages and latest version of discovr as of July 10.

profandyfield commented 4 years ago

looks like learnr is trying to process text in a hint as though it were code when rendering the tutorial, which it shouldn't do (or maybe it should ... in which case I need to rewrite my hints).

profandyfield commented 4 years ago

I've just pushed an update of tutorial 1 with some edits to hints. Any chance you could do a forced reinstall and see what happens when try to run tutorial 1 again. Everything works fine for me, but ...

poldrack commented 4 years ago

different error now:

label: met_name-hint-1
Quitting from lines 401-404 (discovr_01.Rmd) 
Error in parse(text = x, srcfile = src) : 
  <text>:4:0: unexpected end of input
2: 
3: name <- 
  ^
Calls: sourceWithProgress ... <Anonymous> -> parse_all -> parse_all.character -> parse
Execution halted
poldrack commented 4 years ago

BTW - now when I restart Rstudio it automatically starts the tutorial window. is there a way to clear that out?

profandyfield commented 4 years ago

turns out I hadn't put library(learnr) in the setup code chunk of each tutorial. That's why hints were being processed as code. It's been a long few weeks ...

I've just pushed updates to all tutorials, so if you reinstall, hopefully you're good to go. Thanks for spotting this problem and pointing it out.

To stop the tutorial there's a red stop button in the tutorial window which should deactivate it and take you back to the list of available tutorials.

poldrack commented 4 years ago

thanks, that works now. however, I don't see the red stop button in the tutorials pane at the base level (only when I am actually in one of the tutorials):

[image: image.png]

On Fri, Jul 10, 2020 at 8:23 AM Andy Field notifications@github.com wrote:

turns out I hadn't put library(learnr) in the setup code chunk of each tutorial. That's why hints were being processed as code. It's been a long few weeks ...

I've just pushed updates to all tutorials, so if you reinstall, hopefully you're good to go. Thanks for spotting this problem and pointing it out.

To stop the tutorial there's a red stop button in the tutorial window which should deactivate it and take you back to the list of available tutorials.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/profandyfield/discovr/issues/1#issuecomment-656732817, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGUVEFELL72J4KXPUCC4Z3R24W7FANCNFSM4OWUJK5Q .

-- Russell A. Poldrack Albert Ray Lang Professor of Psychology Bldg. 420, Jordan Hall Stanford University Stanford, CA 94305

poldrack@stanford.edu http://www.poldracklab.org/