Hi,

Without knowing what code caused this error, it's a bit difficult to
specifically diagnose, but it seems that you might be trying to override an
existing method?  The doc string gives some details as to the function that
is throwing this error:

def *monkey_patch*(name, bases, namespace):
  """A 'metaclass' for adding new methods to an existing class.

  In this version, existing methods can't be overridden; this is by
  design, to avoid accidents.

  Usage example:

    class PatchClass(TargetClass):
      __metaclass__ = monkey_patch
      def foo(self, ...): ...
      def bar(self, ...): ...

  This is equivalent to:

    def foo(self, ...): ...
    def bar(self, ...): ...
    TargetClass.foo = foo
    TargetClass.bar = bar
    PatchClass = TargetClass

  Note that PatchClass becomes an alias for TargetClass; by convention
  it is recommended to give PatchClass the same name as TargetClass.
  """

-Marzia

On Mon, Dec 22, 2008 at 12:56 AM, yucc <yucc2...@gmail.com> wrote:

>
> I've searched around with not solution,so can anyone tell me how to
> fix this,thanks very much!
>
> As there're to much output,I've put the error page on GoogleDoc:
>
> http://docs.google.com/Doc?id=dck7n8r7_93cmvhs4fk
>
>
>  C:\Google\gae\google\appengine\ext\db\djangoforms.py in monkey_patch
> (name='make_value_from_form', bases=(<class
> 'google.appengine.ext.db.Property'>,), namespace={'__metaclass__':
> <function monkey_patch at 0x018FA130>, '__module__':
> 'google.appengine.ext.db.djangoforms', 'get_form_field': <function
> get_form_field at 0x018FA1B0>, 'get_value_for_form': <function
> get_value_for_form at 0x018FA2F0>, 'make_value_from_form': <function
> make_value_from_form at 0x018FA0F0>})
>  127   for name, value in namespace.iteritems():
>  128     if name not in ('__metaclass__', '__module__'):
>  129       assert name not in base.__dict__, "Won't override
> attribute %r" % (name,)
>  130       setattr(base, name, value)
>  131   return base
> name = 'make_value_from_form', base = <class
> 'google.appengine.ext.db.Property'>, base.__dict__ = <dictproxy object
> at 0x018F0D50>
>
> <type 'exceptions.AssertionError'>: Won't override attribute
> 'make_value_from_form'
>      args = ("Won't override attribute 'make_value_from_form'",)
>      message = "Won't override attribute 'make_value_from_form'"
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to