Hi all:

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 ...

Snippet...
...
obj = context.restrictedTraverse(path)
obj_parent = obj.aq_inner.aq_parent
dest_folder = context.Dest # this is a folder object
copy_info = obj_parent.manage_cutObjects((context.getId()))
dest_folder.manage_pasteObjects(copy_info)
...

Traceback:
Traceback (innermost last):
  Module ZPublisher.Publish, line 115, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 41, in call_object
  Module OFS.CopySupport, line 194, in manage_pasteObjects
  Module OFS.CopySupport, line 527, in _verifyObjectPaste
Copy Error:
<HTML>
<HEAD>
<TITLE>Not Supported</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<FORM ACTION="manage_main" METHOD="GET" >
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="10">
<TR>
  <TD VALIGN="TOP">
  <BR>
  <CENTER><B><FONT SIZE="+6" COLOR="#77003B">!</FONT></B></CENTER>
  </TD>
  <TD VALIGN="TOP">
  <BR><BR>
  <CENTER>
  The object <em>dtmij.txt</em> does not support this operation.
  </CENTER>
  </TD>
</TR>
<TR>
  <TD VALIGN="TOP">
  </TD>
  <TD VALIGN="TOP">
  <CENTER>
  <INPUT TYPE="SUBMIT" VALUE="   Ok   ">
  </CENTER>
  </TD>
</TR>
</TABLE>
</FORM>
</BODY></HTML>
....

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.

My Zope is 2.9.4-final, Python2.4.3.

Any help is greatly appreciated.

TIA,
Aj

"And the trees are all kept equal
By hatchet, axe, and saw"
_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to