On 9/1/06, zope-dev@rosenthaltechnologies.com <zope-dev@rosenthaltechnologies.com> wrote:
I'm getting a ZODB.POSException.ConflictError in the following code in a Custom Zope Product, and I'm hoping someone can enlighten me on how to fix it.
# nd is a folder with a sub-folder "Categories # "NDCategory" is a custom Zope product I wrote that does not have anything called "bogus" defined. categories = nd.Categories.objectValues('NDCategory') for cat in categories: cat.bogus = []
Feels like you might be miss interpreting what a ConflictError is. With some hand waving... ConflictErrors are _not_ a mechanism for prohibiting attribute assignment because that attribute already exists. Instead ConflictErrors are a mechanism to prohibit inadvertent concurrent updates of the same attribute. (Or in older ZODB's, even concurrent reading of an attribute that is being written too.) Check the traceback for your ConflictError to get some details about just what is in conflict. Also might be worth a look in the access logs to see what else might be happening on the server at about the same time. Cheers Michael