[reportlab-users] NameError: global name 'sys' is not defined

Jean Jordaan reportlab-users@reportlab.com
Fri, 10 Sep 2004 10:33:44 +0200


Hi all

While installing Plone's CMFReportTool
   http://cvs.sourceforge.net/viewcvs.py/collective/CMFReportTool/
which makes use of reportlab we encountered a couple of issues
with version 1.19 (1.18 works fine).

First:
     File "/usr/lib/python2.3/site-packages/reportlab/pdfgen/pdfimages.py", line 
137, in getImageData
     if sys.platform[0:4] == 'java':
NameError: global name 'sys' is not defined

The 'sys' module isn't imported, so this error will always
occur. Looks like this issue was reported earlier:
   http://two.pairlist.net/pipermail/reportlab-users/2004-February/002633.html

The second issue is probably not a reportlab problem: in
version 1.18, PIL_Images would always be defined in 'utils.py',
and it is imported by CMFReportTool. In version 1.19 this is no
longer the case, and CMFReportTool raises an importerror. I take
it that PIL_Images isn't intended to be part of the public API?

-- 
Jean Jordaan
http://www.upfrontsystems.co.za