<type 'exceptions.IOError'> | Python 2.7.12: /usr/bin/python Fri Oct 11 23:20:43 2024 |
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 = 'CARTA34.228.52.311695105785855672968.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/CARTA34.228.52.311695105785855672968.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 = '4ecec684d4f2b50c868583de6b19c4d6', image = '/var/www/html/ceu/app/crt_clst/imgs/CARTA34.228.52.311695105785855672968.png', mask = None |
/usr/local/lib/python2.7/dist-packages/reportlab/pdfbase/pdfdoc.py in __init__(self=<reportlab.pdfbase.pdfdoc.PDFImageXObject object>, name='4ecec684d4f2b50c868583de6b19c4d6', source='/var/www/html/ceu/app/crt_clst/imgs/CARTA34.228.52.311695105785855672968.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/CARTA34.228.52.311695105785855672968.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/CARTA34.228.52.311695105785855672968.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/CARTA34.228.52.311695105785855672968.png' |
<type 'exceptions.IOError'>: Cannot open resource "/var/www/html/ceu/app/crt_clst/imgs/CARTA34.228.52.311695105785855672968.png"
args =
('Cannot open resource "/var/www/html/ceu/app/crt_clst/imgs/CARTA34.228.52.311695105785855672968.png"',)
errno =
None
filename =
None
message =
'Cannot open resource "/var/www/html/ceu/app/crt_clst/imgs/CARTA34.228.52.311695105785855672968.png"'
strerror =
None