Re: [Zope] shared instance error
Graham Chiu <anon_emouse@hotmail.com> writes:
I have the following error occasionally occur
<Shared.DC.ZRDB.RDB.DatabaseResults instance at b58540>
The above is the only error in the traceback.
Using NS 4.5, WinNT 4, and 1.11pr1 with Zserver.
Are you sure this is an error? Errors *allways* have tracebacks by their nature, they are Python exceptions. If this is all you are getting, then somwhere in your DTML you are not correctly calling the object above, and the DTML parser is just repr()ing the object. For example, if you iterated over a bunch of subfolders: <!--#in "objectValues('Folder')"--> <!--#var sequence-item--> <!--#/in--> You would get: <Folder instance at XXXXXX> <Folder instance at XXXXXX> <Folder instance at XXXXXX> <Folder instance at XXXXXX> . . . This is because the DTML parser sees that you have just put <!--#sequence-item--> (which is an object) in the output, and since it doesn't know what to do with this object, it simple repr()s it. Somewhere in your code, a Shared.DC.ZRDB.RDB.DatabaseResults object is just be referenced, and probably not called. -Michel
------- Regards, Graham Chiu gchiu<at>compkarori.co.nz
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(For developer-specific issues, use the companion list, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
In article <m3hfnllmtf.fsf@localhost.localdomain>, michel@digicool.com writes
Are you sure this is an error? Errors *allways* have tracebacks by
Well, Zope says it's an error! Zope Error Zope has encountered an error while publishing this resource. Error Type: AttributeError Error Value: query I have tried to determine when this error occurs, and it seems to be only the very first time a particular page is published by zserver/zope. Subsequent accesses to the same page by different browsers do not generate the error. But shut down Zserver/zope, restart, acccess the page, and the error message appears. Refresh within the browser, and the error goes.
their nature, they are Python exceptions. If this is all you are getting, then somwhere in your DTML you are not correctly calling the object above, and the DTML parser is just repr()ing the object. For example, if you iterated over a bunch of subfolders:
<!--#in "objectValues('Folder')"--> <!--#var sequence-item--> <!--#/in-->
You would get:
<Folder instance at XXXXXX> <Folder instance at XXXXXX> <Folder instance at XXXXXX> <Folder instance at XXXXXX> . . .
This is because the DTML parser sees that you have just put <!--#sequence-item--> (which is an object) in the output, and since it doesn't know what to do with this object, it simple repr()s it. Somewhere in your code, a Shared.DC.ZRDB.RDB.DatabaseResults object is just be referenced, and probably not called.
-Michel
------- Regards, Graham Chiu gchiu<at>compkarori.co.nz
participants (2)
-
Graham Chiu -
michel@digicool.com