python-pisa calls PIL tostring instead of tobytes in xenial

Bug #1613634 reported by Walter
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pisa (Ubuntu)
New
Undecided
Unassigned

Bug Description

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.

Tags: patch
Revision history for this message
Walter (wdoekes) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "0005-tostring-2-tobytes.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.