rfortherestofus / pagedreport

Templates for {pagedown}
https://pagedreport.rfortherestofus.com
Other
119 stars 19 forks source link

"Could not fetch https://fonts.googleapis.com/css?family=Gelasio" #40

Open lucas-peralta opened 3 years ago

lucas-peralta commented 3 years ago

Hello, i am having a problem when i try to knit a pagedreport rmd (the basic template without any change) it says :

Could not fetch https://fonts.googleapis.com/css?family=Gelasio HttpExceptionRequest Request { host = "fonts.googleapis.com" port = 443 secure = True requestHeaders = [] path = "/css" queryString = "?family=Gelasio" method = "GET" proxy = Nothing rawBody = False redirectCount = 10 responseTimeout = ResponseTimeoutDefault requestVersion = HTTP/1.1 proxySecureMode = ProxySecureWithConnect } ConnectionTimeout Error: pandoc document conversion failed with error 61 Closing browser Cleaning browser working directory Execution halted

This is my session info:

sessionInfo() R version 4.0.3 (2020-10-10) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.1 LTS

Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0 LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=es_AR.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=es_AR.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=es_AR.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=es_AR.UTF-8 LC_IDENTIFICATION=C

attached base packages: [1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached): [1] pagedreport_0.1 ps_1.6.0 prettyunits_1.1.1 digest_0.6.27 crayon_1.4.1 withr_2.4.2 rprojroot_2.0.2 R6_2.5.0 evaluate_0.14
[10] rlang_0.4.11 cli_2.5.0 curl_4.3.1 remotes_2.3.0 rstudioapi_0.13 callr_3.7.0 rmarkdown_2.7 tools_4.0.3 xfun_0.22
[19] yaml_2.2.1 compiler_4.0.3 processx_3.5.2 pkgbuild_1.2.0 htmltools_0.5.1.1 pagedown_0.14 knitr_1.33

I have updated the pandoc version following this

rmarkdown::pandoc_version() [1] ‘2.13’

Any ideas of what can be happening? I have made a previous report using the package and sometimes i was having this problem but after some tries it worked, but since yesterday i am stucked with this error and doesn't work anymore.

ps: thanks for this great package!

tvroylandt commented 3 years ago

This could happen when you have some Internet issues.

In fact, pagedreport calls Google Font to get the fonts. So if your Internet (or Google Fonts) have trouble, this problem appears.

You could use local fonts if needed (see https://pagedreport.rfortherestofus.com/articles/reports.html)

lucas-peralta commented 3 years ago

It's a problem i have in the two computers with Ubuntu, i tried in one with Windows and it worked. You are right, i should use google-font: FALSE in the YAML. I didn't realize that so i made a twisted solution changing the paths in the .css files to a local .txt instead the web page of the google font API. Thanks for your help!

tvroylandt commented 3 years ago

I have no hint on why it doesn't work on Ubuntu. My computer is on Ubuntu and this works perfectly (yes this isn't an answer, I know).

sheikhbarabas commented 3 years ago

Same issue here on a Windows PC. I set google-font: FALSE in the YAML but it still fails.

Could not fetch https://fonts.googleapis.com/css?family=Inter HttpExceptionRequest Request { host = "fonts.googleapis.com" port = 443 secure = True requestHeaders = [] path = "/css" queryString = "?family=Inter" method = "GET" proxy = Nothing rawBody = False redirectCount = 10 responseTimeout = ResponseTimeoutDefault requestVersion = HTTP/1.1 } (InternalException Network.Socket.recvBuf: invalid argument (Invalid argument)) Warning: Error in : pandoc document conversion failed with error 61

dgkeyes commented 3 years ago

Thanks for letting us know @sheikhbarabas! Just FYI, Thomas (who does most of the development work on the package) is on paternity leave so he may be a bit slow getting back to you.

tvroylandt commented 3 years ago

Thanks @dgkeyes

One solution could be to update Pandoc - see https://github.com/mkearney/mizzourahmd/issues/1