reassign 738510 python-reportlab thanks Matthias Klose <[email protected]> writes:
> Am 10.02.2014 06:29, schrieb Arnaud Fontaine: >> Package: python-reportlab >> Version: 3.0~a1-1 >> Severity: important >> Tags: upstream >> >> When trying to scan with 'hp-scan', I get an error because of reportlab >> new version where '_AsciiBase85Encode' is not defined anymore in >> pdfutils module: > > sure, a name starting with an underscore hints at a private symbol. so hplip > should be fixed. > > reportlab.lib.rl_accel seems to provide asciiBase85Encode now. Sorry if it was not clear in my initial email but as you can see from the traceback below, hp-scan from hplip package only does: from reportlab.pdfgen import canvas c = canvas.Canvas(output, (brx/0.3528, bry/0.3528)) c.drawInlineImage(image, (tlx/0.3528), (tly/0.3528), ((brx-tlx)/0.3528),((bry-tly)/0.3528)) Then, internally in reportlab API, it tries to access _AsciiBase85Encode from reportlab.pdfgen.pdfimages.PDFImage().PIL_imagedata() which is not available anymore in reportlab pdfutils, because as you rightly pointed out, it has been renamed to asciiBase85Encode. So to sum up, the issue is clearly in python-reportlab package because of the API changes in 3.0 and not in hplip. [...] >> Traceback (most recent call last): >> File "/usr/bin/hp-scan", line 1021, in <module> >> c.drawInlineImage(image, (tlx/0.3528), (tly/0.3528), >> ((brx-tlx)/0.3528),((bry-tly)/0.3528)) >> File "/usr/lib/python2.7/dist-packages/reportlab/pdfgen/canvas.py", line >> 826, in drawInlineImage >> img_obj = PDFImage(image, x,y, width, height) >> File "/usr/lib/python2.7/dist-packages/reportlab/pdfgen/pdfimages.py", >> line 40, in __init__ >> self.getImageData() >> File "/usr/lib/python2.7/dist-packages/reportlab/pdfgen/pdfimages.py", >> line 165, in getImageData >> imagedata, imgwidth, imgheight = self.PIL_imagedata() >> File "/usr/lib/python2.7/dist-packages/reportlab/pdfgen/pdfimages.py", >> line 130, in PIL_imagedata >> data = pdfutils._AsciiBase85Encode(data) #...sadly this may not be >> AttributeError: 'module' object has no attribute '_AsciiBase85Encode' Cheers, -- Arnaud Fontaine -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]
