Steve Alexander wrote:
> Michael R. Bernstein wrote:
>  >
>  > File /home/webmaven/Products/ZPatterns/, line 208, in
>  > __set_attr__ (Object: ElementWithAttributes) KeyError: (see above)
> What version of ZPatterns are you using?

0.4.3b2 on Zope 2.2.0

> I certainly don't have the __set_attr__ method covering line 208 in my
> version.

In my, line 208 is the one marked below:

>      def __set_attr__(self,name,val,_v_dm_=_v_dm_):
>          try:
> 208>>>       dm = self.__dict__[_v_dm_]
>          except KeyError:
>              if name=='id' and val==self.__dict__['id']: return
>              raise
> If they don't, you'll get the error that you're reporting.

Well, that's the version I've got, and that is how the
__set_attr__ method reads. What do I check next?

Backtracking a bit more, line 46 in is in
the manage_addArchiveImage method, marked below:

def manage_addArchiveImage(self, id, file, title='',
displays=None, precondition='',
                           content_type='', REQUEST=None):
      Add a new ArchiveImage object.
   # This constructor basically ripped off from Image/File
       id, title = cookId(id, title, file)
   # First, we create the ArchiveImage without data:
46>    self._setObject(id,
   # Now we "upload" the data.  By doing this in two steps,
   # can use a database trick to make the upload more
       if REQUEST:
           try:    url=self.DestinationURL()
           except: url=REQUEST['URL1']
           REQUEST.RESPONSE.redirect('%s/manage_main' % url)
       return id

Does this help?


Michael Bernstein.

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to