htdebeer / pandocomatic

Automate the use of pandoc

Home Page:https://heerdebeer.org/Software/markdown/pandocomatic/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pandocomatic fails to load yaml config file that exists in proper directory

sbw78 opened this issue · comments

I am trying to get the scrivomatic-pandocomataic workflow set up, and am running into an issue with pandocomatic. This is happening when I call pandocomatic directly via command line. I get the following error: Unable to load config file: '/Users/bryanwest/.local/share/pandoc/pandocomatic.yaml'. I've posted this issue here as well.

That directory and file exists, so I'm not sure what is happening.

Here is the scrivomatic logfile:

Any help/advice would be greatly appreciated.

=== ------------------------------------------------------ ===
=== Scrivomatic V1.0.29 Report @ 2020-05-26 16:47:52 -0400 ===
=== ------------------------------------------------------ ===
 Working directory: /Users/bryanwest/Desktop/compile-mmd
 Initiating with Ruby 2.3.7
===------ Input Options: ------===
#<struct Scrivomatic::OPT input="test.mmd", output=nil, to=nil, yaml=nil, command="pandocomatic", envpath="/Users/bryanwest/bin:/Users/bryanwest/.rbenv/shims:/usr/local/lib/ruby/gems/2.7.0/bin:/Library/TeX/texbin:/usr/local/bin", build=false, cleanup=false, verbose=true, dry_run=false, open_log=true, data_dir=nil>
===------ Final ENV PATH: ------===
/Users/bryanwest/bin:/Users/bryanwest/.rbenv/shims:/usr/local/lib/ruby/gems/2.7.0/bin:/Library/TeX/texbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Applications/Scrivener.app/Contents/Resources/MultiMarkdown/bin
===------ TOOL PATHS: ------===
---pandoc: /usr/local/bin/pandoc | V: 2.9.2.1
---pandocomatic: /Users/bryanwest/.rbenv/shims/pandocomatic | V: 
---ruby: /Users/bryanwest/.rbenv/shims/ruby | V: ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin18]
---rbenv versions:
  system
* 2.7.1 (set by /Users/bryanwest/.rbenv/version)
---rbenv: /usr/local/bin/rbenv
---gem: /Users/bryanwest/.rbenv/shims/gem
---python: /usr/bin/python
---xelatex: /Library/TeX/texbin/xelatex
---latexmk: /usr/local/bin/latexmk

 … running pandocomatic, please wait …
===------ COMMAND OUTPUT: ------===
:: Running: /Users/bryanwest/.rbenv/shims/pandocomatic --debug test.mmd 
::: Unable to load config file: '/Users/bryanwest/.local/share/pandoc/pandocomatic.yaml'.
:: exit status: pid 94975 exit 243

!!!---scrivomatic::runCommand() RETURN non-zero value: /Users/bryanwest/.rbenv/shims/pandocomatic --debug test.mmd !!!

and the YAML metadata I am using at the top of my .md file

---
# YAML Header
title: "<$projecttitle>"
subtitle: “<$abbr_projecttitle>”
author:
  - name: My Name
  - affiliation: 1
    correspondence: test@test.edu
institute:
  - ^1^ Affiliation
keywords:
  - test1
  - test2
  - test3
abstract: Abstract text here.
wordcount: <$wc>
date: <$fulldate>
created: "<$createdDate>"
compiled: "<$shortdate>"
pandocomatic_:
  use-template: 
    - latex-scholar
---

I'm currently on vacation; I'll look at it Sunday. For completeness sake, can you tell me the versions of pandoc and pandocomatic you are using? And also a minimal version of the template latex-scholar for which this issue occurs. Or does this issue occur with any template?

I am having the issue on any template I run. I am running pandocomatic 3.1.2 and pandoc 2.9.2.1.

The template called in the scrivomatic script I'm using actually uses a template called pandoc-scholar.latex, which I have attached. It is from https://github.com/iandol/dotpandoc/ which I am using in full.

Thank you for your prompt reply!

I was able to solve the issue I was having by creating a new pandocomatic.yamlfile. I'm not sure exactly what the issue was, but I think it may have been some sort of character encoding error.