ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* nil error in guess
@ 2012-10-13  9:29 Meer, H. van der
  2012-10-15 18:32 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Meer, H. van der @ 2012-10-13  9:29 UTC (permalink / raw)
  To: ConTeXt NTG

! LuaTeX error ...t-04/tex/texmf-context/tex/context/base/grph-inc.lua:221: bad argument #1 to 'match' (string expected, got nil)
stack traceback:
	[C]: in function 'match'
	...t-04/tex/texmf-context/tex/context/base/grph-inc.lua:221: in function 'guess'
	...t-04/tex/texmf-context/tex/context/base/grph-inc.lua:1145: in function <...t-04/tex/texmf-context/tex/context/base/grph-inc.lua:1143>
	(tail call): ?
	...t-04/tex/texmf-context/tex/context/base/grph-inc.lua:767: in function 'locate'
	...t-04/tex/texmf-context/tex/context/base/grph-inc.lua:844: in function 'identifier'
	...t-04/tex/texmf-context/tex/context/base/grph-inc.lua:862: in function 'identify'
	<main ctx instance>:1: in main chunk.

The version used is:
ConTeXt  ver: 2012.10.06 15:31 MKIV  fmt: 2012.10.13  int: english/english


Is there a quick fix, or I get stuck at a bad moment.
Thanks in advance.

Hans van der Meer



___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: nil error in guess
  2012-10-13  9:29 nil error in guess Meer, H. van der
@ 2012-10-15 18:32 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2012-10-15 18:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 13-10-2012 11:29, Meer, H. van der wrote:
> ! LuaTeX error ...t-04/tex/texmf-context/tex/context/base/grph-inc.lua:221: bad argument #1 to 'match' (string expected, got nil)
> stack traceback:
> 	[C]: in function 'match'
> 	...t-04/tex/texmf-context/tex/context/base/grph-inc.lua:221: in function 'guess'
> 	...t-04/tex/texmf-context/tex/context/base/grph-inc.lua:1145: in function <...t-04/tex/texmf-context/tex/context/base/grph-inc.lua:1143>
> 	(tail call): ?
> 	...t-04/tex/texmf-context/tex/context/base/grph-inc.lua:767: in function 'locate'
> 	...t-04/tex/texmf-context/tex/context/base/grph-inc.lua:844: in function 'identifier'
> 	...t-04/tex/texmf-context/tex/context/base/grph-inc.lua:862: in function 'identify'
> 	<main ctx instance>:1: in main chunk.
>
> The version used is:
> ConTeXt  ver: 2012.10.06 15:31 MKIV  fmt: 2012.10.13  int: english/english
>
>
> Is there a quick fix, or I get stuck at a bad moment.
> Thanks in advance.

function figures.guess(filename)
     local f = io.open(filename,'rb')
     if f then
         local str = f:read(100)
         f:close()
         if str then
             for i=1,#magics do
                 local pattern = magics[i]
                 if pattern.pattern:match(str) then
                     local format = pattern.format
                     if trace_figures then
                         report_inclusion("file %q has format 
%s",filename,format)
                     end
                     return format
                 end
             end
         end
     end
end

One might wonder why str is nil.

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2012-10-15 18:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-13  9:29 nil error in guess Meer, H. van der
2012-10-15 18:32 ` Hans Hagen

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).