<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 &quot;CopyError&quot; 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>&nbsp; Module ZPublisher.Publish, line 115, in publish<br>&nbsp; Module ZPublisher.mapply, line 88, in mapply<br>&nbsp; Module ZPublisher.Publish, line 41, in call_object<br>
&nbsp; Module OFS.CopySupport, line 194, in manage_pasteObjects<br>&nbsp; Module OFS.CopySupport, line 527, in _verifyObjectPaste<br>Copy Error:<br>&lt;HTML&gt;<br>&lt;HEAD&gt;<br>&lt;TITLE&gt;Not Supported&lt;/TITLE&gt;<br>&lt;/HEAD&gt;<br>
&lt;BODY BGCOLOR=&quot;#FFFFFF&quot;&gt;<br>&lt;FORM ACTION=&quot;manage_main&quot; METHOD=&quot;GET&quot; &gt;<br>&lt;TABLE BORDER=&quot;0&quot; WIDTH=&quot;100%&quot; CELLPADDING=&quot;10&quot;&gt;<br>&lt;TR&gt;<br>&nbsp; &lt;TD VALIGN=&quot;TOP&quot;&gt;<br>
&nbsp; &lt;BR&gt;<br>&nbsp; &lt;CENTER&gt;&lt;B&gt;&lt;FONT SIZE=&quot;+6&quot; COLOR=&quot;#77003B&quot;&gt;!&lt;/FONT&gt;&lt;/B&gt;&lt;/CENTER&gt;<br>&nbsp; &lt;/TD&gt;<br>&nbsp; &lt;TD VALIGN=&quot;TOP&quot;&gt;<br>&nbsp; &lt;BR&gt;&lt;BR&gt;<br>
&nbsp; &lt;CENTER&gt;<br>&nbsp; The object &lt;em&gt;dtmij.txt&lt;/em&gt; does not support this operation.<br>&nbsp; &lt;/CENTER&gt;<br>&nbsp; &lt;/TD&gt;<br>&lt;/TR&gt;<br>&lt;TR&gt;<br>&nbsp; &lt;TD VALIGN=&quot;TOP&quot;&gt;<br>&nbsp; &lt;/TD&gt;<br>
&nbsp; &lt;TD VALIGN=&quot;TOP&quot;&gt;<br>&nbsp; &lt;CENTER&gt;<br>&nbsp; &lt;INPUT TYPE=&quot;SUBMIT&quot; VALUE=&quot;&nbsp;&nbsp; Ok&nbsp;&nbsp; &quot;&gt;<br>&nbsp; &lt;/CENTER&gt;<br>&nbsp; &lt;/TD&gt;<br>&lt;/TR&gt;<br>&lt;/TABLE&gt;<br>&lt;/FORM&gt;<br>&lt;/BODY&gt;&lt;/HTML&gt;<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>&quot;And the trees are all kept equal<br>By hatchet, axe, and saw&quot;
</div>