Skip to content
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 in file(what, "rb") : cannot open the connection #228

Closed
graydenshand opened this issue Dec 6, 2018 · 2 comments
Closed

Error in file(what, "rb") : cannot open the connection #228

graydenshand opened this issue Dec 6, 2018 · 2 comments

Comments

@graydenshand
Copy link

@graydenshand graydenshand commented Dec 6, 2018

I have been unable to reproduce even the most trivial of examples.

library(ggplot2)
library(gganimate)

ggplot(mtcars) + 
  geom_boxplot(aes(factor(cyl), mpg)) + 
  transition_manual(gear)

Produces the following Traceback:

Error in file(what, "rb") : cannot open the connection
11. file(what, "rb")

10. base64enc::base64encode(x)

9. paste0("<video controls autoplay><source src=\"data:video/", format, ";base64,", base64enc::base64encode(x), "\" type=\"video/mp4\"></video>")

8.  htmltools::HTML(paste0("<video controls autoplay><source src=\"data:video/", format, ";base64,", base64enc::base64encode(x), "\" type=\"video/mp4\"></video>"))

7.  as_html_video(x)

6. htmltools::browsable(as_html_video(x))

5. print(htmltools::browsable(as_html_video(x)))

4.  print.video_file(anim, info = FALSE)

3.  print(anim, info = FALSE)

2. print.gganim(x)

1.  function (x, ...) UseMethod("print")(x)

I've tried reinstalling gganimate, R, R-Studio, imagemagick, etc..

I haven't found this error anywhere else.

@thomasp85
Copy link
Owner

@thomasp85 thomasp85 commented Dec 6, 2018

Maybe related to #201 ? Are you on windows10?

Anyway if you install gifski or magick you should be fine until it is fixed

@graydenshand
Copy link
Author

@graydenshand graydenshand commented Dec 6, 2018

Hi Thomas,
Thank you for your help, that solution worked - I just had to restart my R session after installing the packages. I'm not sure if this is related to #201. However, I am running macOS - details below.

R version 3.3.3 (2017-03-06)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS 10.13.6

High hopes for this package!
Thanks for all your work :)

--EDIT--
I'm curious... If gifski is the primary rendering engine, it might save others this problem if it gets installed with gganimate as a dependency?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants