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

Error with Pandocomatic

iandol opened this issue · comments

pandocomatic is currently failing to start on my desktop machine. Not sure what the error message refers to

➜ pandocomatic -v
Traceback (most recent call last):
	17: from /Users/ian/.rbenv/versions/2.7.2/bin/pandocomatic:23:in `<main>'
	16: from /Users/ian/.rbenv/versions/2.7.2/bin/pandocomatic:23:in `load'
	15: from /Users/ian/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/pandocomatic-0.2.7.3/bin/pandocomatic:2:in `<top (required)>'
	14: from /Users/ian/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
	13: from /Users/ian/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
	12: from /Users/ian/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/pandocomatic-0.2.7.3/lib/pandocomatic/pandocomatic.rb:19:in `<top (required)>'
	11: from /Users/ian/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/pandocomatic-0.2.7.3/lib/pandocomatic/pandocomatic.rb:29:in `<module:Pandocomatic>'
	10: from /Users/ian/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/pandocomatic-0.2.7.3/lib/pandocomatic/pandocomatic.rb:29:in `require_relative'
	 9: from /Users/ian/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/pandocomatic-0.2.7.3/lib/pandocomatic/cli.rb:19:in `<top (required)>'
	 8: from /Users/ian/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/pandocomatic-0.2.7.3/lib/pandocomatic/cli.rb:23:in `<module:Pandocomatic>'
	 7: from /Users/ian/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/pandocomatic-0.2.7.3/lib/pandocomatic/cli.rb:23:in `require_relative'
	 6: from /Users/ian/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/pandocomatic-0.2.7.3/lib/pandocomatic/configuration.rb:19:in `<top (required)>'
	 5: from /Users/ian/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/pandocomatic-0.2.7.3/lib/pandocomatic/configuration.rb:22:in `<module:Pandocomatic>'
	 4: from /Users/ian/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
	 3: from /Users/ian/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
	 2: from /Users/ian/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/paru-0.4.2/lib/paru/pandoc.rb:25:in `<top (required)>'
	 1: from /Users/ian/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/paru-0.4.2/lib/paru/pandoc.rb:81:in `<module:Paru>'
/Users/ian/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/paru-0.4.2/lib/paru/pandoc.rb:238:in `<class:Pandoc>': undefined method `[]' for nil:NilClass (NoMethodError)
➜ ruby -v
ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-darwin19]

➜ gem list | grep -E 'paru|pandocomatic'
pandocomatic (0.2.7.3)
paru (0.4.2)

➜ pandoc --version
pandoc 2.11.1
Compiled with pandoc-types 1.22, texmath 0.12.0.3, skylighting 0.10.0.3,
citeproc 0.1.0.3, ipynb 0.1
User data directory: /Users/ian/.local/share/pandoc or /Users/ian/.pandoc

Reverting to paru to 0.4.1.2 and pandocomatic to 0.2.7.2 and it works.

OK, if I downgrade Pandoc to V2.11.0.2 then it works:

➜ pandoc -v
pandoc 2.11.0.2
Compiled with pandoc-types 1.22, texmath 0.12.0.3, skylighting 0.10.0.2
Default user data directory: /Users/ian/.local/share/pandoc or /Users/ian/.pandoc

➜ pandocomatic -v
Pandocomatic version 0.2.7.3

v2.11.0.4 and it fails so something was changed between 2.11.0.2 and 2.11.0.4

Perhaps it was this from the changelog https://github.com/jgm/pandoc/releases/tag/2.11.0.4:

Modify --version output. Use space more efficiently and report the citeproc and ipynb versions, along with skylighting, texmath, and pandoc-types. Drop the word “default” before “user data directory.”

I can reproduce it here as well. Apparently, pandoc's version information changed and paru uses that information to figure out the default data directory.

I will fix this to match the latest version of pandoc. I'll try to look at it this afternoon.

Gosh, so helpful as always, thanks Huub!

Fixed the issue. You can install pandocomatic 0.2.7.4 and/or paru 0.4.2.1.