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
___________________________________________________________________________________

Reply via email to