jhudsl / ottrpal

Tools for converting OTTR courses into Leanpub or Coursera courses :otter:
https://jhudatascience.org/ottrpal/
GNU General Public License v3.0
3 stars 1 forks source link

More informative error when slides aren't public? #102

Open KatherineCox opened 2 years ago

KatherineCox commented 2 years ago

I semi-frequently forget to make my google slides public before trying to render, which gives me an error that looks like this:

Downloaded 102569 bytes...Quitting from lines 16-17 (03-data-analysts.Rmd) 
Error in png::readPNG(path, native = TRUE, info = TRUE) : 
  file is not in PNG format
Calls: local ... lapply -> FUN -> raster_dpi_width -> attr -> <Anonymous>
Execution `halted`

I know what this means because I do it all the time :) but it's pretty opaque if you haven't seen it before. Is there a good way to return a more informative error message - maybe some check to see if the slide is accessible before trying to include it?

cansavvy commented 2 years ago

Thanks for this issue!