public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* problem with pandoc.utils in lua filters
@ 2018-06-22  5:16 Greg Tucker-Kellogg
       [not found] ` <cf37938e-dd08-4509-a275-66d1dc359c61-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Tucker-Kellogg @ 2018-06-22  5:16 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 3220 bytes --]

I just updated to the latest lua-filters, and every use of 
pandoc.utils.stringify throws an error, e.g., 

[lua-filters-(git:master)] make

bash runtests.sh abstract-to-meta author-info-blocks bibexport cito 
scholarly-metadata scrlttr2 section-refs short-captions spellcheck task-list 
wordcount
PASS abstract-to-meta
Error running filter author-info-blocks.lua:
Error while running filter function: author-info-blocks.lua:103: attempt to 
index a nil value (field 'utils')
--- - 2018-06-22 13:10:07.567118906 +0800
+++ expected.native 2018-06-21 17:12:08.200722160 +0800
@@ -0,0 +1,5 @@
+Pandoc (Meta {unMeta = fromList [("author",MetaInlines [Str "Jane",Space,
Str "Doe",Superscript [Str "*",Str ",",Str "1",Str ",",Str "\9993"],Str ",",
Space,Str "John",Space,Str "Q.",Space,Str "Doe",Superscript [Str "*",Str ","
,Str "1",Str ",",Str "2"],Str ",",Space,Str "and",Space,Str "Juan",Space,Str 
"P\233rez",Superscript [Str "2"]]),("title",MetaInlines [Str "Affiliation",
Space,Str "Blocks",Space,Str "Example"])]})
+[Para [Superscript [Str "*"],Space,Str "These authors contributed equally 
to this work."]
+,Para [Superscript [Str "1"],Space,Str "Federation",Space,Str "of",Space,
Str "Planets",LineBreak,Superscript [Str "2"],Space,Str "Acme",Space,Str 
"Corporation"]
+,Para [Superscript [Str "\9993"],Space,Str "Correspondence:",Space,Link (""
,[],[]) [Str "Jane",Space,Str "Doe",Space,Str "<",Str "jane.doe-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org"
,Str ">"] ("mailto:jane.doe-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org","")]
+,Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",
Space,Str "amet."]]
Makefile:2: recipe for target 'test' failed
make[1]: *** [test] Error 1
FAIL author-info-blocks
PASS bibexport
PASS cito
Error running filter scholarly-metadata.lua:
Error while running filter function: scholarly-metadata.lua:77: attempt to 
index a nil value (field 'utils')
....


A similar error for section-refs.

I ran across the problem when trying to use Pandoc Scholar 
<https://github.com/pandoc-scholar/pandoc-scholar>. I'm using pandoc 2.2.1,

[lua-filters-(git:master)] pandoc --version
pandoc 2.2.1
Compiled with pandoc-types 1.17.5.1, texmath 0.11.0.1, skylighting 0.7.2
Default user data directory: /home/gtk/.pandoc
Copyright (C) 2006-2018 John MacFarlane
Web:  http://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.


I think this must be something I'm doing wrong, because it would be failing 
the CI tests and other people would notice. Does anyone have a suggestion?

Thanks in advance,

Greg

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/cf37938e-dd08-4509-a275-66d1dc359c61%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 40062 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: problem with pandoc.utils in lua filters
       [not found] ` <cf37938e-dd08-4509-a275-66d1dc359c61-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2018-06-22 21:38   ` Albert Krewinkel
       [not found]     ` <87y3f64i4i.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Albert Krewinkel @ 2018-06-22 21:38 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Greg Tucker-Kellogg writes:

> I just updated to the latest lua-filters, and every use of pandoc.utils.stringify throws an error,
> e.g.,
>
> [lua-filters-(git:master)] make
>
> bash runtests.sh abstract-to-meta author-info-blocks bibexport cito scholarly-metadata
> scrlttr2 section-refs short-captions spellcheck task-list wordcount
> PASS abstract-to-meta
> Error running filter author-info-blocks.lua:
> Error while running filter function: author-info-blocks.lua:103: attempt to index a nil value
> (field 'utils')

It looks like `require 'pandoc.utils'` already returns nil, which is
strange (the module exists since pandoc 2.0.6). Many problems with Lua
filters we've seen were related to issues of hslua on 32 bit systems.
How did you install pandoc, from binary or from source? Maybe the issue
is related to this: <https://github.com/jgm/pandoc/issues/4679>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: problem with pandoc.utils in lua filters
       [not found]     ` <87y3f64i4i.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
@ 2018-06-25  1:41       ` Greg Tucker-Kellogg
  0 siblings, 0 replies; 3+ messages in thread
From: Greg Tucker-Kellogg @ 2018-06-25  1:41 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1979 bytes --]

I installed with cabal.

Trying the example filter from <https://github.com/jgm/pandoc/issues/4679 
<https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fjgm%2Fpandoc%2Fissues%2F4679&sa=D&sntz=1&usg=AFQjCNEGjszHyFi08bcqjp3xQHBq1DzoDQ>> gives 
me this:

[lua-filters-(git:master)]  echo | pandoc --lua-filter a.lua
Error running filter a.lua:
a.lua:5: attempt to index a nil value (field 'utils')



On Saturday, June 23, 2018 at 5:38:11 AM UTC+8, Albert Krewinkel wrote:
>
> Greg Tucker-Kellogg writes: 
>
> > I just updated to the latest lua-filters, and every use of 
> pandoc.utils.stringify throws an error, 
> > e.g., 
> > 
> > [lua-filters-(git:master)] make 
> > 
> > bash runtests.sh abstract-to-meta author-info-blocks bibexport cito 
> scholarly-metadata 
> > scrlttr2 section-refs short-captions spellcheck task-list wordcount 
> > PASS abstract-to-meta 
> > Error running filter author-info-blocks.lua: 
> > Error while running filter function: author-info-blocks.lua:103: attempt 
> to index a nil value 
> > (field 'utils') 
>
> It looks like `require 'pandoc.utils'` already returns nil, which is 
> strange (the module exists since pandoc 2.0.6). Many problems with Lua 
> filters we've seen were related to issues of hslua on 32 bit systems. 
> How did you install pandoc, from binary or from source? Maybe the issue 
> is related to this: <https://github.com/jgm/pandoc/issues/4679> 
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/d62bbff0-23e4-4e4c-80ad-6a6e4d4b3319%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 5750 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-06-25  1:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-22  5:16 problem with pandoc.utils in lua filters Greg Tucker-Kellogg
     [not found] ` <cf37938e-dd08-4509-a275-66d1dc359c61-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-06-22 21:38   ` Albert Krewinkel
     [not found]     ` <87y3f64i4i.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2018-06-25  1:41       ` Greg Tucker-Kellogg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).