| <type 'exceptions.IOError'> | Python 2.7.12: /usr/bin/python Tue Dec 23 05:58:35 2025 |
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 = 'NO-PDF-FILE.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/NO-PDF-FILE.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 = '20bf636ad9a1ca1bb56e2cd1d27ed128', image = '/var/www/html/ceu/app/crt_clst/imgs/NO-PDF-FILE.png', mask = None |
| /usr/local/lib/python2.7/dist-packages/reportlab/pdfbase/pdfdoc.py in __init__(self=<reportlab.pdfbase.pdfdoc.PDFImageXObject object>, name='20bf636ad9a1ca1bb56e2cd1d27ed128', source='/var/www/html/ceu/app/crt_clst/imgs/NO-PDF-FILE.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/NO-PDF-FILE.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/NO-PDF-FILE.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/NO-PDF-FILE.png' |
<type 'exceptions.IOError'>: Cannot open resource "/var/www/html/ceu/app/crt_clst/imgs/NO-PDF-FILE.png"
args =
('Cannot open resource "/var/www/html/ceu/app/crt_clst/imgs/NO-PDF-FILE.png"',)
errno =
None
filename =
None
message =
'Cannot open resource "/var/www/html/ceu/app/crt_clst/imgs/NO-PDF-FILE.png"'
strerror =
None