[Zope] Zope says ZEO_client added BTreeFolder2 has broken product
Rodrigo Dias Arruda Senra
rodsenra at gpr.com.br
Mon Aug 16 16:23:17 EDT 2004
Hi,
I am using a ZEO Client script to add a new BTreeFolder2-1.0.1.
The folder is added ok, and populated ok. Through the ZEO-client
I inspect the new added folder, and it is fine.
But when I check through Zope ZMI interface, it says:
'mybtreef2 (This object from the unknown product is broken!)'
If I add the BTreeFolder2 from ZMI (instead of ZEO Script), the folder
is displayed correctly.
So I guess I'm adding this folder the wrong way. I do the following:
<zeo_client_code>
import sys
sys.path.append("C:\\Program Files\\Zope-2.7.2-0\\lib\\python")
# Where I placed BTreeFolder2 product's source code:
sys.path.append("C:\\Program Files\\Zope-2.7.2-0\\lib\\python\\Products")
# ... some imports were ommited
storage = ClientStorage.ClientStorage((ZEO_HOST,ZEO_PORT))
db = DB(storage)
cnx = db.open()
root = cnx.root()
app = root['Application']
teste = app['teste']
if not hasattr(teste,'subfolder2'):
from BTreeFolder2 import BTreeFolder2
f = BTreeFolder2.manage_addBTreeFolder(teste,'subfolder2',title='subfolder2')
get_transaction().commit()
bfolder = teste['subfolder2']
</zeo_client_code>
Any mortal sins ? Clues ?
best regards,
Senra
More information about the Zope
mailing list