Package: djvubind
Version: 1.2.1-5
Severity: important
X-Debbugs-Cc: picca...@truelite.it

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***

When running for a set of 3 tiff images I got:

$ djvubind --no-ocr 
* Collecting files to be processed.
  Binding a total of 3 file(s).
* Analyzing image information.
  Spawning 4 processing threads.
* Performing optical character recognition.
  OCR is disabled and will be skipped.
* Encoding all information to /home/piccardi/Scrivania/Ambros/book/book.djvu.
Traceback (most recent call last):
  File "/usr/bin/djvubind", line 446, in <module>
    proj.bind()
  File "/usr/bin/djvubind", line 171, in bind
    self.enc.enc_book(self.book, self.out)
  File "/usr/lib/python3/dist-packages/djvubind/encode.py", line 281, in 
enc_book
    self._csepdjvu(page.path, tempfile, page.dpi)
  File "/usr/lib/python3/dist-packages/djvubind/encode.py", line 137, in 
_csepdjvu
    self._cjb2('temp_textual.tif', 'enc_bitonal_out.djvu', dpi)
  File "/usr/lib/python3/dist-packages/djvubind/encode.py", line 84, in _cjb2
    utils.execute(cmd)
  File "/usr/lib/python3/dist-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

I got the same error also with version 1.2.1-7 from trixie/texting. I
got the error also non using the --no-ocr option.

There is a confirmed bug on ubuntu that's seems the same:
https://bugs.launchpad.net/ubuntu/+source/djvubind/+bug/2007762

The problem arise because the execution of the cjb2 (by line 84 in
/usr/lib/python3/dist-packages/djvubind/encode.py fails, calling the
print function to report the error, that is failing. 

I checked what was the called command (printing it in the code, on a
trixie test machine) and I tested its results; it fails as:

$ cjb2 -dpi 350 "temp_textual.tif" "enc_bitonal_out.djvu"
*** Tiff image is not bitonal
*** (cjb2.cpp:754)
*** 'void read_tiff(CCImage&, DJVU::ByteStream*, cjb2opts&)'

I got the 3 tiff images I tried to convert from jpeg, using:

mogrify -format tiff p0*jpg

and pheraphs that conversion is not good, but anyway the command
should not crash reporting an error.

-- System Information:
Debian Release: 12.11
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-37-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages djvubind depends on:
ii  djvulibre-bin                    3.5.28-2+b1
ii  imagemagick                      8:6.9.11.60+dfsg-1.6+deb12u3
ii  imagemagick-6.q16 [imagemagick]  8:6.9.11.60+dfsg-1.6+deb12u3
ii  python3                          3.11.2-1+b1
ii  tesseract-ocr                    5.3.0-2

Versions of packages djvubind recommends:
ii  minidjvu  0.8.svn.2010.05.06+dfsg-6+b2

djvubind suggests no packages.

-- no debconf information

Reply via email to