From: <rba...@mu...> - 2017-05-15 12:26:02
|
2017.05.15 Liebe Leut, I got an error message: ------------------------ 552 Traceback (most recent call last): File "constell0.py", line 222, in <module> principal() File "constell0.py", line 216, in principal brochure.writePDFfile("TvD") File "/home/rbm/Python/PyX-0.14.1/pyx/document.py", line 193, in writePDFfile pdfwriter.PDFwriter(self, f, **kwargs) File "/home/rbm/Python/PyX-0.14.1/pyx/pdfwriter.py", line 321, in __init__ registry.write(file, self, catalog) File "/home/rbm/Python/PyX-0.14.1/pyx/pdfwriter.py", line 78, in write object.write(file, writer, self) File "/home/rbm/Python/PyX-0.14.1/pyx/pdfwriter.py", line 244, in write paperformat = self.page.paperformat AttributeError: 'canvas' object has no attribute 'paperformat' ---------------------- A code excerpt: ---------------------- def principal(): " merci pour tout" rprotos = suite_protos() brochure = document.document() for nproto, proto in enumerate(rprotos): page = construirePage(proto, nproto) #page.writePDFfile("page" + str(nproto).zfill(3)) # OK brochure.append(page) print(len(brochure.pages)) # 552 OK brochure.writePDFfile("TvD") ---------------------- Thanks for your help. René |