reportlab import error after dundled using py2exe
shankarphy at gmail.com
Tue Jul 26 09:59:21 CEST 2011
your suggestion worked.Thanks Robin.
On Mon, Jul 25, 2011 at 8:28 PM, Robin Becker <robin at reportlab.com> wrote:
> On 22/07/2011 03:55, SANKAR . wrote:
>> Hi all,
>> 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 at lists2.**reportlab.com<reportlab-users at 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
> that's what we use to make the distributions and seems to work.
> Robin Becker
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list