[Zope] - Help inserting into MySQL

Amos Latteier amos@aracnet.com
Mon, 28 Dec 1998 11:22:50 -0800


At 07:09 AM 12/27/98 -0000, Chad Fowler wrote:

>When I fill out my form, and insert my data, the data actually gets
inserted as intended, but I get a "Zope Unavailable" error with the
following traceback:
>
>Traceback (innermost last):
>  File
/home/brian/temp/build/tmp_build/Zope-1.9.0-linux2-x86/lib/python/ZPublisher
/Publish.py, line 879, in publish_module
>  File
/home/brian/temp/build/tmp_build/Zope-1.9.0-linux2-x86/lib/python/ZPublisher
/Publish.py, line 595, in publish
>    (Info: /pootybbs/newsadder)
>  File
/home/brian/temp/build/tmp_build/Zope-1.9.0-linux2-x86/lib/python/OFS/Docume
nt.py, line 181, in __call__
>    (Object: newsadder)
>  File
/home/brian/temp/build/tmp_build/Zope-1.9.0-linux2-x86/lib/python/OFS/Docume
nt.py, line 177, in __call__
>    (Object: newsadder)
>  File
/home/brian/temp/build/tmp_build/Zope-1.9.0-linux2-x86/lib/python/DocumentTe
mplate/DT_String.py, line 514, in __call__
>    (Object: newsadder)
>  File
/home/brian/temp/build/tmp_build/Zope-1.9.0-linux2-x86/lib/python/DocumentTe
mplate/DT_Util.py, line 268, in eval
>    (Object: insertnews(sub=submitter, cat=category, tit=titl, bod=body))
>  File <string>, line 0, in ?
>  File
/home/brian/temp/build/tmp_build/Zope-1.9.0-linux2-x86/lib/python/Shared/DC/
ZRDB/DA.py, line 402, in __call__
>    (Object: Item)
>  File
/projects/build/ZMySQLDA-1.1.0-nonbin/lib/python/Products/ZMySQLDA/db.py,
line 178, in query
>NameError: (see above)
..
>So, what silly (and wrong) thing could I have done to cause this error?

It's hard to say what's wrong from this traceback. Further up in the source
of the error page you should have a comment which tells what the NameError
is. If the NameError is something like one of your input variables in your
SQL Method than it is likely that you are calling it incorrectly from DTML.
If the NameError is breaking on some obscure name which only occurs in the
Zope code than it is likely a Zope bug.

If it looks like a Zope bug, please submit it on the Zope site at:

http://www.zope.org/Collector

Hope this helps.

-Amos