What steps will reproduce the problem?
1. Using this rst file:
Test
----
.. image:: xmlparsing.png
:align: center
:width: 10%
2. With the attached png image generated using qrencode (xmlparsing.png)
3. I have the following output:
Traceback (most recent call last):
File "/usr/local/bin/rst2pdf", line 9, in <module>
load_entry_point('rst2pdf==0.93.dev', 'console_scripts', 'rst2pdf')()
File "/usr/local/lib/python2.7/dist-packages/rst2pdf/createpdf.py", line 1495, in main
compressed=options.compressed)
File "/usr/local/lib/python2.7/dist-packages/rst2pdf/createpdf.py", line 653, in createPdf
pdfdoc.multiBuild(elements)
File "/usr/local/lib/python2.7/dist-packages/reportlab/platypus/doctemplate.py", line 972, in multiBuild
self.build(tempStory, **buildKwds)
File "/usr/local/lib/python2.7/dist-packages/reportlab/platypus/doctemplate.py", line 892, in build
self.handle_flowable(flowables)
File "/usr/local/lib/python2.7/dist-packages/rst2pdf/createpdf.py", line 762, in handle_flowable
if frame.add(f, canv, trySplit=self.allowSplitting):
File "/usr/local/lib/python2.7/dist-packages/rst2pdf/flowables.py", line 559, in add
return Frame.add(self, flowable, canv, trySplit)
File "/usr/local/lib/python2.7/dist-packages/reportlab/platypus/frames.py", line 174, in _add
flowable.drawOn(canv, self._x + self._leftExtraIndent, y, _sW=aW-w)
File "/usr/local/lib/python2.7/dist-packages/rst2pdf/image.py", line 488, in drawOn
return self.image.drawOn(canv, x, y, _sW)
File "/usr/local/lib/python2.7/dist-packages/reportlab/platypus/flowables.py", line 109, in drawOn
self._drawOn(canvas)
File "/usr/local/lib/python2.7/dist-packages/reportlab/platypus/flowables.py", line 90, in _drawOn
self.draw()#this is the bit you overload
File "/usr/local/lib/python2.7/dist-packages/reportlab/platypus/flowables.py", line 486, in draw
mask=self._mask,
File "/usr/local/lib/python2.7/dist-packages/reportlab/pdfgen/canvas.py", line 926, in drawImage
imgObj = pdfdoc.PDFImageXObject(name, image, mask=mask)
File "/usr/local/lib/python2.7/dist-packages/reportlab/pdfbase/pdfdoc.py", line 2119, in __init__
self.loadImageFromSRC(source) #it is already a PIL Image
File "/usr/local/lib/python2.7/dist-packages/reportlab/pdfbase/pdfdoc.py", line 2216, in loadImageFromSRC
self._checkTransparency(im)
File "/usr/local/lib/python2.7/dist-packages/reportlab/pdfbase/pdfdoc.py", line 2188, in _checkTransparency
tc = im.getTransparent()
File "/usr/local/lib/python2.7/dist-packages/reportlab/lib/utils.py", line 673, in getTransparent
return map(ord, palette[transparency:transparency+3])
TypeError: cannot concatenate 'str' and 'int' objects
Please answer the following questions, they are *very* important:
* Version of rst2pdf?
0.93
* Version of reportlab?
2.7
* Are you using wordaxe, and if true, what version?
no
* Are you using rst2pdf with Sphinx, and if true, what version?
no
Original issue reported on code.google.com by jfl.lala...@gmail.com on 27 Jun 2013 at 11:59
Original issue reported on code.google.com by
jfl.lala...@gmail.com
on 27 Jun 2013 at 11:59Attachments: