jperon / lyluatex

Alternative à lilypond-book pour lualatex
MIT License
56 stars 11 forks source link

Unprecedented error! Need Help! #285

Closed Skelbti closed 3 years ago

Skelbti commented 3 years ago

Hello, While everything was working properly until now, I have an error that I do not understand. I really need help! Here is the log after the attempt to compile a document:

This is LuaHBTeX, Version 1.14.0 (MiKTeX 21.6.28) (format=lualatex 2021.7.8)  8 JUL 2021 00:50
 system commands enabled.
**document.tex
(./document.tex
LaTeX2e <2021-06-01> patch level 1
Lua module: luaotfload 2021-05-21 3.18 Lua based OpenType font support
Lua module: lualibs 2021-05-20 2.74 ConTeXt Lua standard libraries.
Lua module: lualibs-extended 2021-05-20 2.74 ConTeXt Lua libraries -- extended c
ollection.
luaotfload | conf : Root cache directory is "C:/Users/Pc/AppData/Local/MiKTeX/lu
atex-cache/generic/names".
luaotfload | init : Loading fontloader "fontloader-2021-05-20.lua" from kpse-res
olved path "C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/luatex/luaotfload/font
loader-2021-05-20.lua".
Lua-only attribute luaotfload@noligature = 1
Lua-only attribute luaotfload@syllabe = 2
luaotfload | init : Context OpenType loader version 3.116
Inserting `luaotfload.node_processor' at position 1 in `pre_linebreak_filter'.
Inserting `luaotfload.node_processor' at position 1 in `hpack_filter'.
Inserting `luaotfload.glyph_stream' at position 1 in `glyph_stream_provider'.
Inserting `luaotfload.define_font' at position 1 in `define_font'.
Lua-only attribute luaotfload_color_attribute = 3
luaotfload | conf : Root cache directory is "C:/Users/Pc/AppData/Local/MiKTeX/lu
atex-cache/generic/names".
Inserting `luaotfload.harf.strip_prefix' at position 1 in `find_opentype_file'.
Inserting `luaotfload.harf.strip_prefix' at position 1 in `find_truetype_file'.
Inserting `luaotfload.harf.finalize_vlist' at position 1 in `post_linebreak_filt
er'.
Inserting `luaotfload.harf.finalize_hlist' at position 2 in `hpack_filter'.
Inserting `luaotfload.cleanup_files' at position 1 in `wrapup_run'.
Inserting `luaotfload.harf.finalize_unicode' at position 1 in `finish_pdffile'.
Inserting `luaotfload.glyphinfo' at position 1 in `glyph_info'.
Lua-only attribute luaotfload.letterspace_done = 4
Inserting `luaotfload.aux.set_sscale_dimens' at position 1 in `luaotfload.patch_
font'.
Inserting `luaotfload.aux.set_font_index' at position 2 in `luaotfload.patch_fon
t'.
Inserting `luaotfload.aux.patch_cambria_domh' at position 3 in `luaotfload.patch
_font'.
Inserting `luaotfload.aux.fixup_fontdata' at position 1 in `luaotfload.patch_fon
t_unsafe'.
Inserting `luaotfload.aux.set_capheight' at position 4 in `luaotfload.patch_font
'.
Inserting `luaotfload.aux.set_xheight' at position 5 in `luaotfload.patch_font'.
Inserting `luaotfload.rewrite_fontname' at position 6 in `luaotfload.patch_font'
. L3 programming layer <2021-06-18>
Inserting `tracingstacklevels' at position 1 in `input_level_string'.
(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/base/article.cls
Document Class: article 2021/02/12 v1.4n Standard LaTeX document class
(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/base/size10.clo
File: size10.clo 2021/02/12 v1.4n Standard LaTeX file (size option)
luaotfload | db : Font names database loaded from C:/Users/Pc/AppData/Local/MiKT
eX/luatex-cache/generic/names/luaotfload-names.luc)
\c@part=\count179
\c@section=\count180
\c@subsection=\count181
\c@subsubsection=\count182
\c@paragraph=\count183
\c@subparagraph=\count184
\c@figure=\count185
\c@table=\count186
\abovecaptionskip=\skip47
\belowcaptionskip=\skip48
\bibindent=\dimen138
)
(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/lualatex/lyluatex/lyluatex.sty
Package: lyluatex 2019/05/27 v1.0f

(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/luatex/luatexbase/luatexbase.sty
Package: luatexbase 2015/10/04 v1.3 luatexbase interface to LuaTeX 

(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/luatex/ctablestack/ctablestack.s
ty
Package: ctablestack 2015/10/01 v1.0 Catcode table stable support
\@catcodetablestackcnt=\count187
)
\CatcodeTableOther=\catcodetable12
\CatcodeTableExpl=\catcodetable13
) (C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/xkeyval/xkeyval.sty
Package: xkeyval 2020/11/20 v2.8 package option processing (HA)

(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/generic/xkeyval/xkeyval.tex
(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/generic/xkeyval/xkvutils.tex
\XKV@toks=\toks16
\XKV@tempa@toks=\toks17

(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/generic/xkeyval/keyval.tex))
\XKV@depth=\count188
File: xkeyval.tex 2014/12/03 v2.7a key=value parser (HA)
))
(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/graphics/graphicx.sty
Package: graphicx 2020/12/05 v1.2c Enhanced LaTeX Graphics (DPC,SPQR)

(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/graphics/graphics.sty
Package: graphics 2021/03/04 v1.4d Standard LaTeX Graphics (DPC,SPQR)

(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/graphics/trig.sty
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/graphics-cfg/graphics.cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: luatex.def on input line 107.
(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/graphics-def/luatex.def
File: luatex.def 2021/06/01 v1.2c Graphics/color driver for luatex
))
\Gin@req@height=\dimen139
\Gin@req@width=\dimen140
) (C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/minibox/minibox.sty
(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/l3kernel/expl3.sty
Package: expl3 2021-06-18 L3 programming layer (loader) 

(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/l3backend/l3backend-luatex
.def
File: l3backend-luatex.def 2021-05-07 L3 backend support: PDF output (LuaTeX)
\l__color_backend_stack_int=\count189
\l__pdf_internal_box=\box50
))
Package: minibox 2013/06/21 v0.2a Another type of box.
\l_minibox_rule_dim=\dimen141
\l_minibox_pad_dim=\dimen142
)
(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/environ/environ.sty
Package: environ 2014/05/04 v0.3 A new way to define environments

(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/trimspaces/trimspaces.sty
Package: trimspaces 2009/09/17 v1.1 Trim spaces around a token list
)
\@envbody=\toks18
) (C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/currfile/currfile.sty
Package: currfile 2020/09/29 v0.7d Provides the file path elements of the curre
nt input file

(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/kvoptions/kvoptions.sty
Package: kvoptions 2020-10-07 v3.14 Key value format for package options (HO)

(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/generic/ltxcmds/ltxcmds.sty
Package: ltxcmds 2020-05-10 v1.25 LaTeX kernel commands for general use (HO)
)
(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/generic/kvsetkeys/kvsetkeys.sty
Package: kvsetkeys 2019/12/15 v1.18 Key value parser (HO)
)) (C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/filehook/filehook.sty
Package: filehook 2020/09/29 v0.8a Hooks for input files

(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/filehook/filehook-2020.sty
Package: filehook-2020 2020/09/29 v0.8a Hooks for input files
))
\c@currfiledepth=\count190
) (C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/pdfpages/pdfpages.sty
Package: pdfpages 2021/03/06 v0.5t Insert pages of external PDF documents (AM)

(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/base/ifthen.sty
Package: ifthen 2020/11/24 v1.1c Standard LaTeX ifthen package (DPC)
)
(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/tools/calc.sty
Package: calc 2017/05/25 v4.3 Infix arithmetic (KKT,FJ)
\calc@Acount=\count191
\calc@Bcount=\count192
\calc@Adimen=\dimen143
\calc@Bdimen=\dimen144
\calc@Askip=\skip49
\calc@Bskip=\skip50
LaTeX Info: Redefining \setlength on input line 80.
LaTeX Info: Redefining \addtolength on input line 81.
\calc@Ccount=\count193
\calc@Cskip=\skip51
)
(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/eso-pic/eso-pic.sty
Package: eso-pic 2020/10/14 v3.0a eso-pic (RN)
\ESO@tempdima=\dimen145
\ESO@tempdimb=\dimen146

(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/xcolor/xcolor.sty
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)

(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: luatex.def on input line 225.
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
))
\AM@pagewidth=\dimen147
\AM@pageheight=\dimen148
\AM@fboxrule=\dimen149

(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/pdfpages/ppluatex.def
File: ppluatex.def 2021/03/06 v0.5t Pdfpages driver for LuaTeX (AM)
)
\pdfpages@includegraphics@status=\count194
\AM@pagebox=\box51
\AM@global@opts=\toks19
\AM@pagecnt=\count195
\AM@toc@title=\toks20
\c@AM@survey=\count196
\AM@templatesizebox=\box52
)
(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/varwidth/varwidth.sty
Package: varwidth 2009/03/30 ver 0.92;  Variable-width minipages
\@vwid@box=\box53
\sift@deathcycles=\count197
\@vwid@loff=\dimen150
\@vwid@roff=\dimen151
)
(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/metalogo/metalogo.sty
Package: metalogo 2010/05/29 v0.12 Extended TeX logo macros

(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/generic/iftex/ifxetex.sty
Package: ifxetex 2019/10/25 v0.7 ifxetex legacy package. Use iftex instead.

(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/generic/iftex/iftex.sty
Package: iftex 2020/03/06 v1.0d TeX engine tests
))
\xl@everylogo=\toks21
\xl@@everylogo=\toks22
LaTeX Info: Redefining \TeX on input line 193.
LaTeX Info: Redefining \LaTeX on input line 202.
LaTeX Info: Redefining \LaTeXe on input line 219.
)
Lua module: lyluatex-options 2019/05/27 1.0f Module lyluatex-options.
Lua module: lyluatex-lib 2019/05/27 1.0f Module lyluatex-lib.
Lua module: lyluatex 2019/05/27 1.0f Module lyluatex.)
(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/lipsum/lipsum.sty
(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/l3packages/xparse/xparse.s
ty
Package: xparse 2021-06-18 L3 Experimental document command parser
)
Package: lipsum 2021-03-03 v2.3 150 paragraphs of Lorem Ipsum dummy text
 (C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/lipsum/lipsum.ltd.tex
File: lipsum.ltd.tex 2021-03-03 v2.3 The Lorem ipsum dummy text
)) (./document.aux)
\openout1 = document.aux

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for TS1/cmr/m/n on input line 5.
LaTeX Font Info:    Trying to load font information for TS1+cmr on input line 5
.

(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/base/ts1cmr.fd
File: ts1cmr.fd 2019/12/16 v2.5j Standard LaTeX font definitions
)
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for TU/lmr/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.

(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count198
\scratchdimen=\dimen152
\scratchbox=\box54
\nofMPsegments=\count199
\nofMParguments=\count266
\everyMPshowfont=\toks23
\MPscratchCnt=\count267
\MPscratchDim=\dimen153
\MPnumerator=\count268
\makeMPintoPDFobject=\count269
\everyMPtoPDFconversion=\toks24
)
(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/epstopdf-pkg/epstopdf-base
.sty
Package: epstopdf-base 2020-01-24 v2.11 Base part for package epstopdf
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4
85.

(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/00miktex/epstopdf-sys.cfg
File: epstopdf-sys.cfg 2021/03/18 v2.0 Configuration of epstopdf for MiKTeX
)) (C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/pdflscape/pdflscape.sty
Package: pdflscape 2019/12/05 v0.12 Display of landscape pages in PDF (HO)

(C:/Users/Pc/AppData/Local/Programs/MiKTeX/tex/latex/graphics/lscape.sty
Package: lscape 2020/05/28 v3.02 Landscape Pages (DPC)
)
Package pdflscape Info: Auto-detected driver: pdftex on input line 81.
)
[1

{C:/Users/Pc/AppData/Local/MiKTeX/pdftex/config/pdftex.map}]
Inserting `readline' at position 1 in `process_input_buffer'.
Removing  `readline' from `process_input_buffer'.
Module lyluatex Info: Compiling score tmp-ly/f9b2689710960936f036431c63b69f74 wi
th LilyPond executable 'lilypond'. on input line 16
...Data/Local/Programs/MiKTeX/scripts/lyluatex/lyluatex.lua:117: bad argument #2
 to 'gsub' (string/function/table expected)
stack traceback:
    [C]: in function 'string.gsub'
    ...Data/Local/Programs/MiKTeX/scripts/lyluatex/lyluatex.lua:117: in upvalue 'ex
tract_includepaths'
    ...Data/Local/Programs/MiKTeX/scripts/lyluatex/lyluatex.lua:810: in method 'lil
ypond_cmd'
    ...Data/Local/Programs/MiKTeX/scripts/lyluatex/lyluatex.lua:1126: in method 'ru
n_lilypond'
    ...Data/Local/Programs/MiKTeX/scripts/lyluatex/lyluatex.lua:1090: in method 'pr
ocess'
    [\directlua]:1: in main chunk.
\ly@compilescore ...directlua {ly.score:process()}

l.16 \end{lilypond}

? 

Underfull \hbox (badness 10000) in paragraph at lines 16--17

 []

[2] (./document.aux))

Here is how much of LuaTeX's memory you used:
 4297 strings out of 478064
 100000,662416 words of node,token memory allocated
 411 words of node memory still in use:
   3 hlist, 1 vlist, 1 rule, 2 glue, 3 kern, 1 glyph, 4 attribute, 49 glue_spec,
 4 attribute_list, 1 write nodes
   avail lists: 2:58,3:41,4:21,5:287,6:12,7:8059,9:141,10:15,11:601
 24453 multiletter control sequences out of 65536+600000
 25 fonts using 2905767 bytes
 85i,5n,85p,1628b,154s stack positions out of 5000i,500n,10000p,200000b,80000s
<//?/c:/users/pc/appdata/local/programs/miktex/fonts/opentype/public/lm/lmroman1
0-regular.otf>
Output written on document.pdf (2 pages, 12596 bytes).

PDF statistics: 16 PDF objects out of 1000 (max. 8388607)
 0 named destinations out of 1000 (max. 131072)
 1 words of extra memory for PDF output out of 10000 (max. 100000000)
Skelbti commented 3 years ago

I found a solution. As mentioned in the log, I was using MikTeX and it was working fine until this error. So I looked for what had changed on my computer before the error. I had also installed TexLive to see the differences but since I was not using it primarily, I uninstalled it. Finally, I reinstalled it to check if LyLuaLatex works again and it does. I don't have enough knowledge of Lua to tell precisely what changes. Conclusion: the script works with TexLive only.

jperon commented 3 years ago

This isn’t the first time we face an error on MikTeX only. It seems not to find lilypond executable the same way as TeXLive does. The problem is I’m running on Linux, and though I had already installed a Windows VM to test on MikTeX, I couldn’t find time to do it last months. If you could give me a MWE that throws this error, I’d look at it ASAP (which doesn’t necessarily mean tomorrow !).

Skelbti commented 3 years ago

I encountered the error of not being able to find the Lilypond executable on Windows. My guess is that when installing Lilypond on Windows, the installer set the following path in the system environment as C:\Program Files (x86)\LilyPond\usr\bin\lilypond-windows.exe. This causes a problem that I fixed by changing the PATH variable to C:\Program Files (x86)\LilyPond\usr\bin only.

Any Lilypond file would raise this error but I tested with this one:

\documentclass{article}
\usepackage{lyluatex}
\begin{document}
Here comes some music:
\begin{lilypond}

music = {c' e' g'} 
\score {  
    \new Staff <<
        \clef bass 
        \music
    >>
}

\end{lilypond}
More text.
\end{document}