Public bug reported:

Versions:

  python-pil:amd64                   3.1.2-0ubuntu1
  python-pisa                        3.0.32-3

Exception:

  File "...", line 172, in to_pdf
    context = CreatePDF(src=source, dest=destination, default_css=DEFAULT_CSS)
  File "/usr/lib/python2.7/dist-packages/sx/pisa3/pisa_document.py", line 161, 
in pisaDocument
    doc.build(c.story)
  ...
  File "/usr/lib/python2.7/dist-packages/reportlab/pdfbase/pdfdoc.py", line 
2190, in loadImageFromSRC
    raw = im.getRGBData()
  File "/usr/lib/python2.7/dist-packages/sx/pisa3/pisa_reportlab.py", line 319, 
in getRGBData
    self._data = im.tostring()
  File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 695, in tostring
    "Please call tobytes() instead.")
  Exception: tostring() has been removed. Please call tobytes() instead.

Fix:

- replace the tostring call with tobytes

See the attached patch.

Cheers,
Walter Doekes
OSSO B.V.

** Affects: pisa (Ubuntu)
     Importance: Undecided
         Status: New

** Patch added: "0005-tostring-2-tobytes.patch"
   
https://bugs.launchpad.net/bugs/1613634/+attachment/4721766/+files/0005-tostring-2-tobytes.patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1613634

Title:
  python-pisa calls PIL tostring instead of tobytes in xenial

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pisa/+bug/1613634/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to