jthomasmock / gtExtras

A Collection of Helper Functions for the gt Package.
https://jthomasmock.github.io/gtExtras/
Other
197 stars 27 forks source link

NYTimes and 538 Themes Give Pandoc Error 10 #89

Closed kaince closed 1 year ago

kaince commented 1 year ago

Description

NYTimes and 538 themes give "Error: pandoc document conversion failed with error 10" when trying to compile to html

Reproducible example

---
title: "reprex"
author: "kaince"
date: "`r Sys.Date()`"
output: html_document
---

knitr::opts_chunk$set(echo = FALSE, warning = FALSE)
library(tidyverse)
library(gt)
library(gtExtras)
library(openintro)
library(broom)
library(mosaic)
library(readxl)
library(stringr)
library(readr)
library(ggplot2)
library(janitor)
library(infer)
library(dplyr)
tabyl(mtcars, am, cyl) |>
  adorn_totals(where = c("row", "col")) |>
  gt() |>
  gt_theme_nytimes() |>
  tab_header(title = "Number of Cylinders by Transmission Type")
  session_info = TRUE

Expected result

NYTimes-style table should be outputted after clicking "knit".

Session info

[WARNING] Could not fetch resource https://fonts.gstatic.com/s/sourcesanspro/v21/6xKydSBYKcSV-LCoeQqfX1RYOo3i94_AkA.ttf: HttpExceptionRequest Request {
    host                 = "fonts.gstatic.com"
    port                 = 443
    secure               = True
    requestHeaders       = []
    path                 = "/s/sourcesanspro/v21/6xKydSBYKcSV-LCoeQqfX1RYOo3i94_AkA.ttf"
    queryString          = ""
    method               = "GET"
    proxy                = Nothing
    rawBody              = False
    redirectCount        = 10
    responseTimeout      = ResponseTimeoutDefault
    requestVersion       = HTTP/1.1
    proxySecureMode      = ProxySecureWithConnect
  }
   (InternalException (HandshakeFailed (Error_Protocol ("certificate rejected: [InvalidSignature SignatureInvalid]",True,CertificateUnknown))))
Error: pandoc document conversion failed with error 10
Execution halted```

File: test.Rmd.zip

richarddmorey commented 1 year ago

Did you ever get to the bottom of this? I'm encountering pandoc error 10 intermittently connected to fonts.gstatic.com as well. Happy to provide more detail if it would help.

jthomasmock commented 1 year ago

Hmm I'm not able to reproduce - the document renders for me:

image

Is this still an issue for you both?

richarddmorey commented 1 year ago

I've now got a reproducible example that I'm just about (matter of minutes) about to post under rstudio/rmarkdown's issues page. It appears to happen randomly when pandoc is downloading fonts, particularly when there are many of them (I think it has a small probability of occuring for each font file, so I created a massive CSS file that references many fonts). The odd thing is that "Error 10" is not a valid pandoc error code, so the big mystery is why this is occuring. I'll link back here when I post the issue.

jthomasmock commented 1 year ago

Looks like an upstream issue w/ pandoc from the linked issue. Closing for now but let me know if there's something specific to gtExtras.