[reportlab-users] NameError: name '__loader__' is not defined

dimitri pater dimitri.pater at gmail.com
Mon Nov 20 17:27:52 EST 2006


Hi,

thanks for your reply Robin,
I discoverd that when running the example files from the Python interpreter
or Komodo the NameError doesn't occur, it only occurs in the WingIDE debug
process. If I select "ignore this exception location" in the WingIDE
debugger all goes well. Don't know why...
Thanks,
Dimitri

On 11/20/06, Robin Becker <robin at reportlab.com> wrote:

>

> dimitri pater wrote:

> > Hello,

> > I am new here to this list...

> > I have just installed reportlab 2.0 using the .tgz from the

> > reportlab.orgwebsite and installed it on my Linux Suse

> > 10.1 laptop. Import reportlab works from the Python command line. But

> the

> > first example from the reportlab doc throws an exeption (my ide is

> > WingIDE):

> >

> >

> > NameError: name '__loader__' is not defined

> >

> > Traceback (innermost last):

> >

> > File "/home/metroviewer/Desktop/reportlab_2_0/reportlab/test/runAll.py",

> > line 1, in ?

> > #!/usr/bin/env python

> > File "/home/metroviewer/Desktop/reportlab_2_0/reportlab/test/runAll.py",

> > line 93, in ?

> > main()

> > File "/home/metroviewer/Desktop/reportlab_2_0/reportlab/test/runAll.py",

> > line 41, in main

> > from reportlab.lib.utils import isSourceDistro

> > File "/usr/local/lib/python2.4/site-packages/reportlab/lib/utils.py",

> line

> > 147, in ?

> > _isFSD = not __loader__

> >

> > I also get this error running the runAll.py

> >

> > Any idea? Your help is appreciated.

> > Thanks,

> > Dimitri

> ......

>

> Peculiar. The 2.0 tag branch of utils.py has a try block around that

> statement

>

> eg

>

> try:

> _isFSD = not __loader__

> .......

> .......

> except:

> #do something else

>

> I notice that you appear to have

> /home/metroviewer/Desktop/reportlab_2_0/reportlab/ in one place and

> /usr/local/lib/python2.4/site-packages/reportlab/ in another so the older

> version of reportlab may be buggy.

>

> A way round this (and a check) would be to try setting this in your

> environment

> before running the test

>

>

> export PYTHON=/home/metroviewer/Desktop/reportlab_2_0

> python /home/metroviewer/Desktop/reportlab_2_0/reportlab/test/runAll.py

>

>

> --

> Robin Becker

> _______________________________________________

> reportlab-users mailing list

> reportlab-users at reportlab.com

> http://two.pairlist.net/mailman/listinfo/reportlab-users

>




--
---
You can't have everything. Where would you put it? -- Steven Wright
---
please visit www.serpia.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://two.pairlist.net/pipermail/reportlab-users/attachments/20061120/7d16faef/attachment.html


More information about the reportlab-users mailing list