[Zope] NameError Problem with FileLibrary example.
Bun Topping
sesamoid@ntlworld.com
01 Aug 2003 06:07:30 +0100
--=-Wi/USPCy3oEuVdI4L4Q7
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Hi,
I'm a complete Zope newie here, I've scanned the archives and I can't
see a useful pointer to help me completely explain/solve my problem, it
could be one of those 'so obvious, no one's had to ask before...'
things.
I've just installed Zope 2.7.0-b1, python 2.3 and CMF 1.3.1. By way of
learning and testing the installation I've looked at the 4 examples
supplied. The FileLibrary example doesn't work and I get the following
in the error log when I try to upload a file (any file, big, small,
text, binary etc.):
Module ZPublisher.Publish, line 98, in publish
* Module ZPublisher.mapply, line 88, in mapply
* Module ZPublisher.Publish, line 39, in call_object
* Module Shared.DC.Scripts.Bindings, line 252, in __call__
* Module Shared.DC.Scripts.Bindings, line 283, in _bindAndExec
* Module Products.PythonScripts.PythonScript, line 320, in _exec
* Module Script (Python), line 6, in addFile
<PythonScript at /Examples/FileLibrary/addFile used for
/Examples/FileLibrary/Files>
Line 6
* Module Script (Python), line 6, in LimitExceeded
<PythonScript at /Examples/FileLibrary/addFile used for
/Examples/FileLibrary/Files>
Line 6
NameError: global name '__name__' is not defined
I did read some references to problems with imported ZClasses but, at
this early stage on the learning curve, that didn't really explain much
to me. Can anyone suggest what is happening here? In particular, is this
problem a symptom of a SNAFU installation or is it just the example that
is SNAFU? If it's the example then I could learn a lot by just knowing
how to fix it. OTOH, if the installation is stuffed, perhaps the best
option is to start again from scratch.
Thanks.
--
Mark <sesamoid@ntlworld.com>
--=-Wi/USPCy3oEuVdI4L4Q7
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.0.7">
</HEAD>
<BODY>
Hi,<BR>
<BR>
I'm a complete Zope newie here, I've scanned the archives and I can't see a useful pointer to help me completely explain/solve my problem, it could be one of those 'so obvious, no one's had to ask before...' things.<BR>
<BR>
I've just installed Zope 2.7.0-b1, python 2.3 and CMF 1.3.1. By way of learning and testing the installation I've looked at the 4 examples supplied. The FileLibrary example doesn't work and I get the following in the error log when I try to upload a file (any file, big, small, text, binary etc.):<BR>
<BR>
Module ZPublisher.Publish, line 98, in publish
<UL>
<LI>Module ZPublisher.mapply, line 88, in mapply
<LI>Module ZPublisher.Publish, line 39, in call_object
<LI>Module Shared.DC.Scripts.Bindings, line 252, in __call__
<LI>Module Shared.DC.Scripts.Bindings, line 283, in _bindAndExec
<LI>Module Products.PythonScripts.PythonScript, line 320, in _exec
<LI>Module Script (Python), line 6, in addFile<BR>
<B><PythonScript at /Examples/FileLibrary/addFile used for /Examples/FileLibrary/Files><BR>
Line 6</B>
<LI>Module Script (Python), line 6, in LimitExceeded<BR>
<B><PythonScript at /Examples/FileLibrary/addFile used for /Examples/FileLibrary/Files><BR>
Line 6</B>
</UL>
NameError: global name '__name__' is not defined <BR>
<BR>
<BR>
I did read some references to problems with imported ZClasses but, at this early stage on the learning curve, that didn't really explain much to me. Can anyone suggest what is happening here? In particular, is this problem a symptom of a SNAFU installation or is it just the example that is SNAFU? If it's the example then I could learn a lot by just knowing how to fix it. OTOH, if the installation is stuffed, perhaps the best option is to start again from scratch. <BR>
<BR>
Thanks.<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
-- <BR>
Mark <<A HREF="mailto:sesamoid@ntlworld.com"><U>sesamoid@ntlworld.com</U></A>>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
--=-Wi/USPCy3oEuVdI4L4Q7--