[reportlab-users] ERROR

Robin Becker reportlab-users@reportlab.com
Thu, 12 Aug 2004 12:47:20 +0100


HERITIER Damien wrote:

> Hello, 
> 
> This is the result of the runAll.py test. 
> 
> I think that the traceback said that there is no file in test folder call pythonpowered.gif.
> But there is one. 
> Can you help me to resolve the error. ;-/
>

we used to have some problems related to bugs in reportlab generic file reader 
code, but in this case it seems as though it's PIL's code that's failing.

I can tell from the traceback that this code is outof date compared to what I'm 
running now and may have had bugs fixed related to your error.




>  
> Thanks for your help 
> damien
> 
> PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32.
> 
> 
>>>>.....F.........................E......................................C:\Program Files\Plone 2\Python\lib\site-packages\reportlab\pdfbase\ttfonts.py:190: FutureWarning: x<<y losing bits or changing sign will return a long in Python 2.4 and up
> 
>   return (hi << 16) | (lo & 0xFFFF)
> ....C:\Program Files\Plone 2\Python\lib\site-packages\reportlab\pdfbase\ttfonts.py:169: FutureWarning: %u/%o/%x/%X of negative int will return a signed string in Python 2.4 and up
>   return '0X%8.8X' % i
> ...............................................................
> ======================================================================
> ERROR: test (test_invariant.InvarTestCase)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "C:\Program Files\Plone 2\Python\Lib\site-packages\reportlab\test\test_invariant.py", line 23, in test
>     c.drawImage('pythonpowered.gif',100,600)
>   File "C:\Program Files\Plone 2\Python\lib\site-packages\reportlab\pdfgen\canvas.py", line 595, in drawImage
>     imgObj = pdfdoc.PDFImageXObject(name, image, mask=mask)
>   File "C:\Program Files\Plone 2\Python\lib\site-packages\reportlab\pdfbase\pdfdoc.py", line 1785, in __init__
>     self.loadImageFromA85(source)
>   File "C:\Program Files\Plone 2\Python\lib\site-packages\reportlab\pdfbase\pdfdoc.py", line 1791, in loadImageFromA85
>     imagedata = map(string.strip,pdfutils.cacheImageFile(source,returnInMemory=1,IMG=IMG))
>   File "C:\Program Files\Plone 2\Python\lib\site-packages\reportlab\pdfbase\pdfutils.py", line 42, in cacheImageFile
>     img = ImageReader(filename)
>   File "C:\Program Files\Plone 2\Python\lib\site-packages\reportlab\lib\utils.py", line 319, in __init__
>     self._image = PIL.Image.open(fileName)
>   File "C:\Program Files\Plone 2\Python\Lib\site-packages\PIL\Image.py", line 1543, in open
>     fp = __builtin__.open(fp, "rb")
> IOError: [Errno 2] No such file or directory: 'pythonpowered.gif'
> 
> ======================================================================
> FAIL: Test if all manuals buildable from source.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "C:\Program Files\Plone 2\Python\Lib\site-packages\reportlab\test\test_docs_build.py", line 33, in test0
>     assert os.path.isfile('userguide.pdf'), 'genAll.py failed to generate userguide.pdf!'
> AssertionError: genAll.py failed to generate userguide.pdf!
> 
> ----------------------------------------------------------------------
> Ran 137 tests in 20.140s
> 
> FAILED (failures=1, errors=1)
> _______________________________________________
> reportlab-users mailing list
> reportlab-users@reportlab.com
> http://two.pairlist.net/mailman/listinfo/reportlab-users
> 
> 


-- 
Robin Becker