Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #10255 > unrolled thread
| Started by | Robin Becker <robin@reportlab.com> |
|---|---|
| First post | 2011-07-25 11:28 +0100 |
| Last post | 2011-07-25 11:28 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: reportlab import error after dundled using py2exe Robin Becker <robin@reportlab.com> - 2011-07-25 11:28 +0100
| From | Robin Becker <robin@reportlab.com> |
|---|---|
| Date | 2011-07-25 11:28 +0100 |
| Subject | Re: reportlab import error after dundled using py2exe |
| Message-ID | <mailman.1448.1311589752.1164.python-list@python.org> |
On 22/07/2011 03:55, SANKAR . wrote: > Hi all, > ........ > > C:\Python26\dist>DELchek.exe > Traceback (most recent call last): > File "DELchek.py", line 12, in<module> > File "reportlab\pdfgen\canvas.pyc", line 25, in< > File "reportlab\pdfbase\pdfdoc.pyc", line 22, in > File "reportlab\pdfbase\pdfmetrics.pyc", line 23, > File "reportlab\pdfbase\_fontdata.pyc", line 158, > ImportError: No module named _fontdata_enc_winansi > > But I could see the '_fontdata_enc_winansi' module in reportlab folder. > Could someone help me to fix this. > ......... You can try asking this in the reportlab list reportlab-users@lists2.reportlab.com but perhaps this is more about py2exe than reportlab. The modules _fontdata_enc_* & _fontdata_widths_* are imported dynamically in _fontdata.py rather than explicitly. I suspect that py2exe needs to be given a hint that this is going on. However, I'm uncertain as to why this should be required since even if the imports are being dynamically imported that is done as soon as _fontdata is imported (ie it's part of the module code) so those modules should be seen by the setup.py. If you don't have reportlab explicitly imported as part of the packages try adding this to the packages list packages=[ ........................................ 'reportlab', 'reportlab.graphics.charts', 'reportlab.graphics.samples', 'reportlab.graphics.widgets', 'reportlab.graphics.barcode', 'reportlab.graphics', 'reportlab.lib', 'reportlab.pdfbase', 'reportlab.pdfgen', 'reportlab.platypus', ], that's what we use to make the distributions and seems to work. -- Robin Becker
Back to top | Article view | comp.lang.python
csiph-web