[reportlab-users] test_pdfgen_general.py fails on UnicodeEncodeError ?

reportlab at richardshea.fastmail.fm reportlab at richardshea.fastmail.fm
Wed Sep 17 01:18:48 EDT 2008


Hi - I've just installed Reportlab 2.1 and am have problems with the
test_pdfgen_general.py - stacktrace at bottom of message.

I have two versions of Python installed on the same machine and both
have reportlab installed in them (I've only just today installed the
Python 2.5 and associated packages).

As can be seen in the stack trace somehow the test_pdfgen_general.py run
under 2.5 is trying to make use of the reportlab installation installed
under 2.4.1. Can anyone explain why ?

If necessary I can de-install Reportlab from the 2.4.1 installation -
how would I do that - just delete the E:\bin\ installed\ Python2.4.1\
lib\ site-packages\ reportlab directory ?

Any help appreciated.

E:\bin\installed\Python2.5\reportlab_2_1\reportlab\test>python
test_pdfgen_general.py
E
======================================================================
ERROR: Make a PDFgen document with most graphics features
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_pdfgen_general.py", line 833, in test0
run(outputfile('test_pdfgen_general.pdf'))
File "test_pdfgen_general.py", line 799, in run
c.save()
File
"E:\bin\installed\Python2.4.1\lib\site-packages\reportlab\pdfgen\canvas.py",
line 843, in save
self._doc.SaveToFile(self._filename, self)
File
"E:\bin\installed\Python2.4.1\lib\site-packages\reportlab\pdfbase\pdfdoc.py",
line 218, in SaveToFile
f.write(self.GetPDFData(canvas))
File
"E:\bin\installed\Python2.4.1\lib\site-packages\reportlab\pdfbase\pdfdoc.py",
line 233, in GetPDFData
self.info.digest(self.signature)
File
"E:\bin\installed\Python2.4.1\lib\site-packages\reportlab\pdfbase\pdfdoc.py",
line 1319, in digest
md5object.update(str(x))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in
position 1: ordinal not in range(128)

----------------------------------------------------------------------
Ran 1 test in 2.141s

FAILED (errors=1)


Regards

Richard.



More information about the reportlab-users mailing list