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 pandoc when applying sa4ss #15

Closed
shcaba opened this issue Mar 3, 2021 · 7 comments
Closed

Error in pandoc when applying sa4ss #15

shcaba opened this issue Mar 3, 2021 · 7 comments

Comments

@shcaba
Copy link

shcaba commented Mar 3, 2021

I followed the Readme instructions (and made sure all libraries are installed), confirmed the presence of pandoc in RStudio, and tried the "Create a PDF" example, but get the following error:

Error: pandoc document conversion failed with error 1
Please delete _main.Rmd after you finish debugging the error.

ADDED:
While pandoc is listed in my path variables, I get this error when trying in the R terminal:

Error: pandoc version 1.12.3 or higher is required and was not found (see the help page ?rmarkdown::pandoc_available).
In addition: Warning message:
In verify_rstudio_version() :
Please install or upgrade Pandoc to at least version 1.17.2; or if you are using RStudio, you can just install RStudio 1.0+.
Please delete _main.Rmd after you finish debugging the error.

RStudio is the latest version (1.4.1103), with latest Pandoc (‘2.11.2’) installed in it.

@kellijohnson-NOAA
Copy link
Contributor

Can you zip the folder where you were trying to build it and email it to me?

@kellijohnson-NOAA
Copy link
Contributor

I think one problem is in that Rtools is higher up in your path than rtools40, which is leading to the discrepancies in the error messages between Rstudio that forces the use of rtools40 and the R terminal that uses the hierarchy of your path. We might need IT to remove the old Rtools from your path.

Then the second problem is the lack of access to sed. I think when we tried to add rtools40 to the path yesterday that we did something wrong b/c if you look at your path there are quotes around the last three items like it is a single item rather than three individual items. Can you modify your path again ensuring that each of the rtools40 calls are on a single line, like the highlighted line in the example below
image

Thank you everyone for posting all of the error messages, I am sorry this is so difficult, but know that I am documenting all of the installation issues and trying to make more helpful checks with complete warning messages to help us in the future. So the pain will decrease I promise. Please tag your installation issues with the label type:installation to allow easier searching.

@mkapur
Copy link

mkapur commented Mar 10, 2021

I was also having install issues and received the same pandoc errors at first, but got the example to work using the following. Hopefully this might help someone else.

  1. I ensured my system PATH was updated to have rtools40 & friends first.
  2. I installed the latest version of pandoc by downloading the windows installer here & restarting my computer after install. I don't think this on its own was suffient, however.
  3. What did the trick was updating to the latest version of RStudio based on Yihui's comment on this issue.

I then restarted Rstudio, deleted the old doc directory I'd been working with, and ran the example code. The document compilation ran for ~10 mins (passing the previous error) then threw ! LaTeX Error: Environment CSLReferences undefined. I will post a separate issue regarding this.
Disclaimer: I am not working on a federally-issued machine.

@kellijohnson-NOAA
Copy link
Contributor

kellijohnson-NOAA commented Mar 23, 2021

I think @mkapur 's error is because of the newer version of Pandoc. I found guidance here for the rticles package in how to accommodate newer versions of Pandoc and plan on implementing them soon.

@melissamonk-NOAA
Copy link

melissamonk-NOAA commented Mar 24, 2021

I also just rant into a similar issue when running bookdown. I can knit an individual .Rmd file, but not using the bookdown package. There's an additional error i added just so you're aware of it for has_crop_tools. I do not have Rtools or rtools40 installed or in my path environment. Do I need to install one or the other?

Error:
pandoc.exe: sed: createProcess: does not exist (No such file or directory)
Error: pandoc document conversion failed with error 1
In addition: Warning message:
In has_crop_tools() :
Tool(s) not installed or not in PATH: pdfcrop, ghostcript
-> As a result, figure cropping will be disabled.
Please delete _main.Rmd after you finish debugging the error.

@kellijohnson-NOAA
Copy link
Contributor

kellijohnson-NOAA commented Mar 24, 2021

  • d42036c allows sa4ss to work with all versions of pandoc in theory and should help @mkapur and her issue regarding CLSReferences
  • e8b8080 provides documentation on how to get sed which is what @melissamonk-NOAA was running into with the above error of pandoc.exe: sed: createProcess: does not exist (No such file or directory) because sed is called while running pandoc but they are actually two different executables, both of which must be in your path.
  • @shcaba we need to get your machine working
  • @lee-qi we need to get your Mac working

@kellijohnson-NOAA
Copy link
Contributor

Thanks to @jimianelli-NOAA who pointed me to this stack exchange commentary on sed across operating systems, which is making it where the example doesn't work on Macs. In short, it appears that sed should be available but the format of the function call needs to be more generic to work on Macs.

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

4 participants