Hello,<br><br>What about just doing the import yourself:<br><span style="font-weight: bold;">container._importObjectFromFile(f)</span><br><br>(rather than using the ZMI's manage_importObject method through a zope client connection) ?
<br><br>Eric BREHAULT<br><br><div><span class="gmail_quote">On 3/12/07, <b class="gmail_sendername">Fabio Marcone</b> <<a href="mailto:fabio.marcone@duet.it">fabio.marcone@duet.it</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Jens Vagelpohl wrote:<br>>>> I have a problem using manage_importObject?file=... with zope2.9.<br>>>> In particular: object is successfully imported but if I shutdown and<br>>>> then reboot the server, I don't see anymore imported object. If I import
<br>>>> the same object using web form "Import/Export" I have not this strange<br>>>> behavior.<br>><br>> Are you calling manage_importObject from Python code? Are you sure the<br>> transaction is committed? If you're calling this in some external script
<br>> (such as a script run via "zopectl run") without starting a "normal" web<br>> request you may have to explicitly commit the transaction.<br>><br>> jens<br>><br>><br>><br>perhaps this is the problem...
<br>in fact /var/lib/zope2.9/instance/myinstance/var is empty after<br>importObject operation using python script.<br><br>but the commit has been introduced in zope 2.9?<br>I use the same code in zope2.7 without problem.<br>
in a python script I use:<br>zopeClient('<a href="http://localhost:9673/manage_importObject?file=app.zexp',myuser,mypassword">http://localhost:9673/manage_importObject?file=app.zexp',myuser,mypassword</a>)<br>
<br>where zopeClient is:<br> def zopeClient(url,username,passwd):<br> f = Function(url)<br> f.username = username<br> f.password = passwd<br> apply(f,(),{})
<br><br>How I can do "commit"?<br><br>Thanks,<br>Fabio<br><br><br>_______________________________________________<br>Zope maillist - <a href="mailto:Zope@zope.org">Zope@zope.org</a><br><a href="http://mail.zope.org/mailman/listinfo/zope">
http://mail.zope.org/mailman/listinfo/zope</a><br>** No cross posts or HTML encoding! **<br>(Related lists -<a href="http://mail.zope.org/mailman/listinfo/zope-announce">http://mail.zope.org/mailman/listinfo/zope-announce
</a><br><a href="http://mail.zope.org/mailman/listinfo/zope-dev">http://mail.zope.org/mailman/listinfo/zope-dev</a> )<br><br>--<br><br>Dott. Fabio Marcone<br><br>2T srl<br>Telefono +39 - 0871- 540154
<br>Fax +39 - 0871- 571594<br>Email fabio.marcone(AT)duet.it<br>Indirizzo Viale B. Croce 573<br> 66013 Chieti Scalo (CH)
<br>GNU/Linux registered user #400424<br>_______________________________________________<br>Zope maillist - <a href="mailto:Zope@zope.org">Zope@zope.org</a><br><a href="http://mail.zope.org/mailman/listinfo/zope">
http://mail.zope.org/mailman/listinfo/zope</a><br>** No cross posts or HTML encoding! **<br>(Related lists -<br> <a href="http://mail.zope.org/mailman/listinfo/zope-announce">http://mail.zope.org/mailman/listinfo/zope-announce
</a><br> <a href="http://mail.zope.org/mailman/listinfo/zope-dev">http://mail.zope.org/mailman/listinfo/zope-dev</a> )<br></blockquote></div><br>