How do you delete an object that cannot be seen in the ZMI
Hi, I have created an object in the ZODB that I cannot see in the ZMI and now don't know how to remove it. More importantly I would like to understand what I did so as not to do it again. I am sure more info is needed to track down the problem but I don't know what it would be. A brief explanation of what I am trying to accomplish. I am creating a folderish object with its id be autogenerated. Inside of this new object I want to create another folderish object with an id = 'Invoices'. Here is the traceback: Traceback (innermost last): Module ZPublisher.Publish, line 98, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Products.PRealEstate.PRealEstate, line 253, in addPParcel Module OFS.ObjectManager, line 272, in _setObject Module Products.PRealEstate.PParcel, line 139, in manage_afterAdd Module OFS.Folder, line 46, in manage_addFolder Module OFS.ObjectManager, line 244, in _setObject Module OFS.ObjectManager, line 77, in checkValidId Bad Request: The id "Invoices" is invalid--it is already in use. Here is the code that caused it: def manage_afterAdd(self, item, container): """ Processing after creation """ item.manage_addProduct['OFSP'].manage_addFolder('Invoices', '') Thanks, Mike
Michael Long wrote at 2003-7-10 17:27 -0400:
I have created an object in the ZODB that I cannot see in the ZMI and now don't know how to remove it. More importantly I would like to understand what I did so as not to do it again. I am sure more info is needed to track down the problem but I don't know what it would be.
A brief explanation of what I am trying to accomplish. I am creating a folderish object with its id be autogenerated. Inside of this new object I want to create another folderish object with an id = 'Invoices'. ... Module OFS.ObjectManager, line 77, in checkValidId Bad Request: The id "Invoices" is invalid--it is already in use.
"Invoices" is either an instance or a class attribute. You can delete an instance attribute with "delattr(instance,name)" ( only in trusted Python code). To remove a class attribute, you must remove it in the source, as otherwise it will be recreated when Zope starts for the next time. Dieter
Deiter, When you say class attribute would that include the methods defined in a class? If so I see the problem. Thanks, Mike On Fri, 2003-07-11 at 14:33, Dieter Maurer wrote:
Michael Long wrote at 2003-7-10 17:27 -0400:
I have created an object in the ZODB that I cannot see in the ZMI and now don't know how to remove it. More importantly I would like to understand what I did so as not to do it again. I am sure more info is needed to track down the problem but I don't know what it would be.
A brief explanation of what I am trying to accomplish. I am creating a folderish object with its id be autogenerated. Inside of this new object I want to create another folderish object with an id = 'Invoices'. ... Module OFS.ObjectManager, line 77, in checkValidId Bad Request: The id "Invoices" is invalid--it is already in use.
"Invoices" is either an instance or a class attribute.
You can delete an instance attribute with "delattr(instance,name)" ( only in trusted Python code). To remove a class attribute, you must remove it in the source, as otherwise it will be recreated when Zope starts for the next time.
Dieter
Michael Long wrote at 2003-7-11 15:39 -0400:
When you say class attribute would that include the methods defined in a class? If so I see the problem.
Yes, methods are usually class attributes. They may, however, be inherited (in which case, they were a class attribute from an inherited class). Dieter
participants (2)
-
Dieter Maurer -
Michael Long