strider1551 / djvubind

Combine multiple image files into an optimally compressed djvu file.
19 stars 6 forks source link

Error when running on tifs from scantailor processed with mixed mode (color + b&w) (same for color+grayscale mode) #26

Open kauesena opened 2 years ago

kauesena commented 2 years ago

In a folder with tif images produced by the software ScanTailor with the mixed mode output setting, running "djvubind" results in no djvu file and in this log:

* Encoding all information to /home/kaue/Study/Alemão/Zorach/out-color/book.djvu.
Traceback (most recent call last):
File "/bin/djvubind", line 446, in <module>
proj.bind()
File "/bin/djvubind", line 171, in bind
self.enc.enc_book(self.book, self.out)
File "/usr/lib/python3.10/site-packages/djvubind/encode.py", line 281, in enc_book
self._csepdjvu(page.path, tempfile, page.dpi)
File "/usr/lib/python3.10/site-packages/djvubind/encode.py", line 137, in _csepdjvu
self._cjb2('temp_textual.tif', 'enc_bitonal_out.djvu', dpi)
File "/usr/lib/python3.10/site-packages/djvubind/encode.py", line 84, in _cjb2
utils.execute(cmd)
File "/usr/lib/python3.10/site-packages/djvubind/utils.py", line 193, in execute
print(utils.color("err: [utils.execute()] Command exited with bad status.", 'red'), file=sys.stderr)
NameError: name 'utils' is not defined