michal-h21 / make4ht

Build system for tex4ht
137 stars 15 forks source link

./make4ht-lib.lua:5: attempt to index global 'logging' (a nil value) #47

Closed jsbien closed 3 years ago

jsbien commented 3 years ago

The message is from the fresh install from the repository on Debian buster. The version from the Debian package produced the error I encountered already some time ago: https://tug.org/pipermail/xetex/2019-March/027455.html. The discussion at https://tex.stackexchange.com/questions/225783/install-make4ht-with-miktex made me try texlua make4ht ..., it also complaines about \bbl@loaded being an undefined sentence. An experiment on Debian testing gives some othe Lua-related errors. Fortunately I have no specific deadline for making the conversion, so I can "make haste slowly".

michal-h21 commented 3 years ago

Hello Janusz, this is strange, because the logging library is part of make4ht for more than a year. I think there was some issue with initial release of TeX Live 2020, but they were fixed quickly. Could you run make4ht with the -a debug option and post the terrminal output here? I hope it will tell us something.

jsbien commented 3 years ago

make4ht installed locally: jsbien@JSBbuster:~/work/make4ht$ which make4ht /home/jsbien/.local/bin/make4ht The debug option doesn't provide any additional information: jsbien@JSBbuster:~/work/make4ht$ make4ht -a debug -uxc hej.cfg -f odt repertuarUngler1oo.tex ./make4ht-lib.lua:5: attempt to index global 'logging' (a nil value) The line 5 in the referenced file is local log = logging.new "make4ht-lib" Is "logging.new" a file? I don't have it anywhere on the disk. I also don't see it in your repository. On Debian testing the error is ...texmf-dist/scripts/make4ht/filters/make4ht-domfilter.lua:2: module 'luaxml-domobject' not found:

michal-h21 commented 3 years ago

It seems that luaxml-domobject is included in the texlive-luatex package. It seems that all make4ht files are in texlive-extra-utils, but make4ht-logging.lua is missing. It is included in vanilla TeX Live, so I think we can say that this file is missing only in Debian.

jsbien commented 3 years ago

Looks like make4ht-logging.lua in Debian it is available only in sid. I will make a virtual machine with sid and will make some tests.

michal-h21 commented 3 years ago

Is it possible to make a bug report in Debian? This is fatal error, so I think they should want to fix it.

jsbien commented 3 years ago

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=990513

jsbien commented 3 years ago

make4ht installed locally: jsbien@JSBbuster:~/work/make4ht$ which make4ht /home/jsbien/.local/bin/make4ht The debug option doesn't provide any additional information: jsbien@JSBbuster:~/work/make4ht$ make4ht -a debug -uxc hej.cfg -f odt repertuarUngler1oo.tex ./make4ht-lib.lua:5: attempt to index global 'logging' (a nil value) The line 5 in the referenced file is local log = logging.new "make4ht-lib" Is "logging.new" a file? I don't have it anywhere on the disk. I also don't see it in your repository.

Let me remind that this problem occurs when the command is run in the current version of the repository, which contains make4ht-logging.lua. So the culprit is not a missing file (at least not this one).

michal-h21 commented 3 years ago

Does your version of /home/jsbien/.local/bin/make4ht contain the following line?

 logging = require "make4ht-logging"
jsbien commented 3 years ago

Yes.

michal-h21 commented 3 years ago

And does kpsewhich make4ht-logging.lua print a path to that file?

jsbien commented 3 years ago

/home/jsbien/texmf/scripts/lua/make4ht/make4ht-logging.lua The path is correct.

michal-h21 commented 3 years ago

It is then really strange, because make4ht loads make4ht-logging.lua and makes it globally available as logging library. It should be available in all loaded Lua files.

jsbien commented 3 years ago

I will make some additional tests in a day or so.

jsbien commented 3 years ago

A quick test on Debian bullseye (testing). bullseyeBAD.zip

michal-h21 commented 3 years ago

Ah, that's lot of errors. Could you please make a MWE? Or post the log created with -a debug option?

jsbien commented 3 years ago

For now just the log. bullseyeBAD1.zip

jsbien commented 3 years ago

It is then really strange, because make4ht loads make4ht-logging.lua and makes it globally available as logging library. It should be available in all loaded Lua files. The logging problem does not occur if the document is typeset first with XeLaTeX. However there is another fatal error - cf. the enclosed log. buster+repository.zip

michal-h21 commented 3 years ago

I think I will need TeX samples here, because I I cannot find the variable referenced in the first log file in TeX4ht sources at all. And the second log file reports error in biblatex.4ht, but the line that should cause that issue contains just comments.

jsbien commented 3 years ago

Thanks for your help!