This is a snapshot of Indico's old Trac site. Any information contained herein is most probably outdated. Access our new GitHub site here.

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#884 closed defect (fixed)

Exception in contribution to pdf when logo is not an image

Reported by: arescope Owned by: arescope
Priority: critical Milestone: v0.98.1
Component: General Version:
Keywords: Cc:

Description

2011-07-25 14:33:19,376 indico.requestHandler - ERROR base.py:346 -- Request 46912748547152 failed: "cannot identify image file

handle_pageBegin args=()"

url: https://indico.cern.ch:443/contributionDisplay.py/pdf?contribId=5&confId=105970

parameters: {'contribId': '5', 'confId': '105970'}

Traceback (most recent call last):

File "/usr/lib/python2.6/site-packages/indico-0.98_dev-py2.6.egg/MaKaC/webinterface/rh/base.py", line 528, in process

res = self._process()

File "/usr/lib/python2.6/site-packages/indico-0.98_dev-py2.6.egg/MaKaC/webinterface/rh/contribDisplay.py", line 105, in _process

data = pdf.getPDFBin()

File "/usr/lib/python2.6/site-packages/indico-0.98_dev-py2.6.egg/MaKaC/PDFinterface/base.py", line 436, in getPDFBin

self._doc.build(self._story, onFirstPage=self.firstPage, onLaterPages=self.laterPages)

File "/usr/lib64/python2.6/site-packages/reportlab/platypus/doctemplate.py", line 1110, in build

BaseDocTemplate?.build(self,flowables, canvasmaker=canvasmaker)

File "/usr/lib64/python2.6/site-packages/reportlab/platypus/doctemplate.py", line 874, in build

self.clean_hanging()

File "/usr/lib64/python2.6/site-packages/reportlab/platypus/doctemplate.py", line 509, in clean_hanging

self.handle_flowable(self._hanging)

File "/usr/lib64/python2.6/site-packages/reportlab/platypus/doctemplate.py", line 756, in handle_flowable

f.apply(self)

File "/usr/lib64/python2.6/site-packages/reportlab/platypus/doctemplate.py", line 140, in apply

getattr(doc,arn)(*args)

File "/usr/lib64/python2.6/site-packages/reportlab/platypus/doctemplate.py", line 1086, in handle_pageBegin

self._handle_pageBegin()

File "/usr/lib64/python2.6/site-packages/reportlab/platypus/doctemplate.py", line 534, in handle_pageBegin

self.pageTemplate.onPage(self.canv,self)

File "/usr/lib/python2.6/site-packages/indico-0.98_dev-py2.6.egg/MaKaC/PDFinterface/conference.py", line 687, in firstPage

if not self._drawLogo(c):

File "/usr/lib/python2.6/site-packages/indico-0.98_dev-py2.6.egg/MaKaC/PDFinterface/base.py", line 477, in _drawLogo

img = PILImage.open(imagePath)

File "/usr/lib64/python2.6/site-packages/PIL/Image.py", line 1980, in open

raise IOError("cannot identify image file")

IOError: cannot identify image file

handle_pageBegin args=()

Change History (5)

comment:1 Changed 4 years ago by arescope

  • Status changed from new to assigned

comment:2 Changed 4 years ago by arescope

  • Status changed from assigned to in_work

comment:3 Changed 4 years ago by arescope

  • Status changed from in_work to awaiting_merge

comment:4 Changed 4 years ago by Alberto Resco Perez <alberto.resco.perez@…>

  • Resolution set to fixed
  • Status changed from awaiting_merge to closed

In [9ba5c08f279a30f53b539de4835e12b986f37a89/indico]:

[FIX] Exception in contrib pdf when logo not image

  • Catch the exception and generate the pdf without the logo.
  • Closes #884.

comment:5 Changed 4 years ago by Alberto Resco Perez <alberto.resco.perez@…>

In [9ba5c08f279a30f53b539de4835e12b986f37a89/indico]:

[FIX] Exception in contrib pdf when logo not image

  • Catch the exception and generate the pdf without the logo.
  • Closes #884.
Note: See TracTickets for help on using tickets.