Imprima ou fa├ža o download do arquivo
--> -->
 
 
<type 'exceptions.IOError'>
Python 2.7.12: /usr/bin/python
Wed Nov 30 22:08:02 2022

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 /var/www/html/ceu/app/gera_pdf/gera_pdf_carta_TESTE.py in ()
     90 
     91 #c.drawImage('app/crt_clst/imgs/'+mnome_arq_carta, 0, 0, 10*cm, 10*cm)
=>   92 c.drawImage('/var/www/html/ceu/app/crt_clst/imgs/'+mnome_arq_carta, 15, 0, width=570, height=None,preserveAspectRatio=True)
     93 
     94 c.setFont('Times-Roman', 13) #setando a fonte da carta
c = <reportlab.pdfgen.canvas.Canvas instance>, c.drawImage = <bound method Canvas.drawImage of <reportlab.pdfgen.canvas.Canvas instance>>, mnome_arq_carta = 'CARTA44.192.53.22716693439211643011182.png', width undefined, height undefined, builtin None = None, preserveAspectRatio undefined, builtin True = True
 /usr/local/lib/python2.7/dist-packages/reportlab/pdfgen/canvas.py in drawImage(self=<reportlab.pdfgen.canvas.Canvas instance>, image='/var/www/html/ceu/app/crt_clst/imgs/CARTA44.192.53.22716693439211643011182.png', x=15, y=0, width=570, height=None, mask=None, preserveAspectRatio=True, anchor='c', anchorAtXY=False, showBoundary=False)
    951         if not imgObj:
    952             #first time seen, create and register the PDFImageXobject
=>  953             imgObj = pdfdoc.PDFImageXObject(name, image, mask=mask)
    954             imgObj.name = name
    955             self._setXObjects(imgObj)
imgObj = None, global pdfdoc = <module 'reportlab.pdfbase.pdfdoc' from '/usr/lo...n2.7/dist-packages/reportlab/pdfbase/pdfdoc.pyc'>, pdfdoc.PDFImageXObject = <class 'reportlab.pdfbase.pdfdoc.PDFImageXObject'>, name = '4bc1060f5f10b9c9b2e31b70a7ec1244', image = '/var/www/html/ceu/app/crt_clst/imgs/CARTA44.192.53.22716693439211643011182.png', mask = None
 /usr/local/lib/python2.7/dist-packages/reportlab/pdfbase/pdfdoc.py in __init__(self=<reportlab.pdfbase.pdfdoc.PDFImageXObject object>, name='4bc1060f5f10b9c9b2e31b70a7ec1244', source='/var/www/html/ceu/app/crt_clst/imgs/CARTA44.192.53.22716693439211643011182.png', mask=None)
   2087             import os
   2088             ext = os.path.splitext(source)[1].lower()
=> 2089             src = open_for_read(source)
   2090             try:
   2091                 if not(ext in ('.jpg', '.jpeg') and self.loadImageFromJPEG(src)):
src undefined, global open_for_read = <function open_for_read>, source = '/var/www/html/ceu/app/crt_clst/imgs/CARTA44.192.53.22716693439211643011182.png'
 /usr/local/lib/python2.7/dist-packages/reportlab/lib/utils.py in open_for_read(name='/var/www/html/ceu/app/crt_clst/imgs/CARTA44.192.53.22716693439211643011182.png', mode='b', urlopen=<function urlopen>, datareader=<function datareader>)
    661             return getBytesIO(datareader(name) if name[:5].lower()=='data:' else urlopen(name).read())
    662         except:
=>  663             raise IOError('Cannot open resource "%s"' % name)
    664 del urlopen, datareader
    665 
builtin IOError = <type 'exceptions.IOError'>, name = '/var/www/html/ceu/app/crt_clst/imgs/CARTA44.192.53.22716693439211643011182.png'

<type 'exceptions.IOError'>: Cannot open resource "/var/www/html/ceu/app/crt_clst/imgs/CARTA44.192.53.22716693439211643011182.png"
      args = ('Cannot open resource "/var/www/html/ceu/app/crt_.../imgs/CARTA44.192.53.22716693439211643011182.png"',)
      errno = None
      filename = None
      message = 'Cannot open resource "/var/www/html/ceu/app/crt_.../imgs/CARTA44.192.53.22716693439211643011182.png"'
      strerror = None