<div dir="ltr">Hi all:<br><br>Ive been trying to cut objects from one context and paste them into another using a script python. But I get a "CopyError" when I try doing this. This is my code snippet and the traceback ...<br>
<br>Snippet...<br>...<br>obj = context.restrictedTraverse(path)<br>obj_parent = obj.aq_inner.aq_parent<br>dest_folder = context.Dest # this is a folder object<br> copy_info = obj_parent.manage_cutObjects((context.getId()))<br>
dest_folder.manage_pasteObjects(copy_info)<br>...<br><br>Traceback:<br>Traceback (innermost last):<br> Module ZPublisher.Publish, line 115, in publish<br> Module ZPublisher.mapply, line 88, in mapply<br> Module ZPublisher.Publish, line 41, in call_object<br>
Module OFS.CopySupport, line 194, in manage_pasteObjects<br> Module OFS.CopySupport, line 527, in _verifyObjectPaste<br>Copy Error:<br><HTML><br><HEAD><br><TITLE>Not Supported</TITLE><br></HEAD><br>
<BODY BGCOLOR="#FFFFFF"><br><FORM ACTION="manage_main" METHOD="GET" ><br><TABLE BORDER="0" WIDTH="100%" CELLPADDING="10"><br><TR><br> <TD VALIGN="TOP"><br>
<BR><br> <CENTER><B><FONT SIZE="+6" COLOR="#77003B">!</FONT></B></CENTER><br> </TD><br> <TD VALIGN="TOP"><br> <BR><BR><br>
<CENTER><br> The object <em>dtmij.txt</em> does not support this operation.<br> </CENTER><br> </TD><br></TR><br><TR><br> <TD VALIGN="TOP"><br> </TD><br>
<TD VALIGN="TOP"><br> <CENTER><br> <INPUT TYPE="SUBMIT" VALUE=" Ok "><br> </CENTER><br> </TD><br></TR><br></TABLE><br></FORM><br></BODY></HTML><br>
....<br><br>I cannot perform this operation directly using the ZMI also. So it is not a problem with the script. Some issue in CopySupport. I searched for the resolution and found that CopySupport needs to be patched. But I couldnt find the patch anywhere. <br>
<br>My Zope is 2.9.4-final, Python2.4.3.<br><br>Any help is greatly appreciated.<br><br>TIA,<br>Aj<br><br>"And the trees are all kept equal<br>By hatchet, axe, and saw"
</div>