Python syntax error in textobject.py

Bug #1320676 reported by Jesse Manning
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-reportlab (Debian)
New
Undecided
Unassigned
python-reportlab (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Traceback (most recent call last):
...
  File "/usr/lib/python2.7/dist-packages/reportlab/pdfgen/textobject.py", line 436, in textLines
    lines = '\n'.split(asUnicode(stuff).strip())
ValueError: empty separator

This is a split, not a join. The fix is to change the line to:

lines = asUnicode(stuff).strip().split('\n')

% lsb_release -rd
Description: Ubuntu 14.04 LTS
Release: 14.04

% apt-cache policy python-reportlab
python-reportlab:
  Installed: 3.0-1build1
  Candidate: 3.0-1build1
  Version table:
 *** 3.0-1build1 0
        500 http://mirrors.us.kernel.org/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

This was discovered as part of an attempted PDF export in ocrfeeder.
The PDF was not exported until I manually went into this python module and fixed the syntax error. The fix produced the desired result.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: python-reportlab 3.0-1build1 [modified: usr/lib/python2.7/dist-packages/reportlab/pdfgen/textobject.py]
ProcVersionSignature: Ubuntu 3.13.0-24.46-generic 3.13.9
Uname: Linux 3.13.0-24-generic x86_64
ApportVersion: 2.14.1-0ubuntu3
Architecture: amd64
CurrentDesktop: XFCE
Date: Sun May 18 10:13:31 2014
InstallationDate: Installed on 2012-09-09 (615 days ago)
InstallationMedia: Ubuntu-Server 12.04.1 LTS "Precise Pangolin" - Release amd64 (20120817.3)
PackageArchitecture: all
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/usr/bin/zsh
SourcePackage: python-reportlab
UpgradeStatus: Upgraded to trusty on 2014-04-26 (22 days ago)

Revision history for this message
Jesse Manning (jmaps-lp) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in python-reportlab (Ubuntu):
status: New → Confirmed
Revision history for this message
Brian Murray (brian-murray) wrote :

This seems to still be an issue in vivid and python-reportlab version 3.1.8. It'd be good if you were to send your fix to the upstream developers.

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.