[Zope] Attrib exceptions and None objects under heavy load?

Etienne Labuschagne ELabuschagne@gims.com
Fri, 30 Aug 2002 19:04:18 +0200


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C25047.4734ADD0
Content-Type: text/plain;
	charset="iso-8859-1"

I am currently (mis?)using zope as the base for a persistent message
queueing system.  I have created various Zope classes in Python (message,
topic, node, etc.) and will typically create a lot of message objects in a
topic object (topic inherits from folder), while reading those messages at
the same time AND distributing them to other zopes.

This means that there is a lot of object creation, reading and deletion
going on from multiple threads.  I will typically use getObjectValues to
loop through the objects in a container and then handle each object.

Sometimes I get the following exceptions:

None type does not have attribute bla bla - as if the object I get is a
Python None and not the actual object
Attribute error when calling a method on a object, even though that object
has the relevant method (this one happens a lot). ie. AttributeError:
addMessages on a Topic object, even though Topic class has a addMessage
defined.

The funny thing is, I never get Conflict errors (according to the Zope
developer guide, that is what typically happens when multiple threads hit a
ZODB).

Any suggestions?

Thanks
Etienne

P.S. This message queue product is probably in a state now where I can give
it to the community if anybody feel they need something like this and want
to contribute to the development.

------_=_NextPart_001_01C25047.4734ADD0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>Attrib exceptions and None objects under heavy load?</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2 FACE=3D"Arial">I am currently (mis?)using zope as the =
base for a persistent message queueing system.&nbsp; I have created =
various Zope classes in Python (message, topic, node, etc.) and will =
typically create a lot of message objects in a topic object (topic =
inherits from folder), while reading those messages at the same time =
AND distributing them to other zopes.</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">This means that there is a lot of =
object creation, reading and deletion going on from multiple =
threads.&nbsp; I will typically use getObjectValues to loop through the =
objects in a container and then handle each object.</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Sometimes I get the following =
exceptions:</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">None type does not have attribute bla =
bla - as if the object I get is a Python None and not the actual =
object</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Attribute error when calling a method =
on a object, even though that object has the relevant method (this one =
happens a lot). ie. AttributeError: addMessages on a Topic object, even =
though Topic class has a addMessage defined.</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">The funny thing is, I never get =
Conflict errors (according to the Zope developer guide, that is what =
typically happens when multiple threads hit a ZODB).</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Any suggestions?</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Thanks</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Etienne</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">P.S. This message queue product is =
probably in a state now where I can give it to the community if anybody =
feel they need something like this and want to contribute to the =
development.</FONT></P>

</BODY>
</HTML>
------_=_NextPart_001_01C25047.4734ADD0--