[reportlab-users] Platypus Gives NameError on Import
Nicholas Urie
halthecomputer at letterboxes.org
Wed Jun 14 13:14:40 EDT 2006
When I try to run any of the platypus examples in the user guide (p. 56
or p. 57), I get the following error:
> NameError: name '__loader__' is not defined
>
> Traceback (innermost last):
>
> File "c:\Documents and Settings\Aardvark\My Documents\reportlab\testCase.py", line 1, in ?
> from reportlab.lib.styles import getSampleStyleSheet
> File "c:\Documents and Settings\Aardvark\My Documents\reportlab\testCase.py", line 1, in ?
> from reportlab.lib.styles import getSampleStyleSheet
> File "C:\Python24\reportlab\lib\styles.py", line 6, in ?
> from reportlab.lib.colors import white, black
> File "C:\Python24\reportlab\lib\colors.py", line 8, in ?
> from reportlab.lib.utils import fp_str
> File "C:\Python24\reportlab\lib\utils.py", line 147, in ?
> _isFSD = not __loader__
testCase.py contains just one line:
from reportlab.lib.styles import getSampleStyleSheet
a similar NameError (__loader__ is not defined) is caused by the
one-line file:
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer
but running either import command from an interactive python shell works
just fine. I'm running Python 2.4.3 and reportlab 2.0 on Windows XP.
More information about the reportlab-users
mailing list