I'm going through some examples and just ran across this error as
well:
AssertionError at /
Won't override attribute 'make_value_from_form'
Request Method: GET
Request URL:
http://localhost:8080/
Exception Type: AssertionError
Exception Value: Won't override attribute 'make_value_from_form'
Exception Location: C:\Program Files\Google\google_appengine\google
\appengine\ext\db\djangoforms.py in monkey_patch, line 127
Could anyone point me in the right direction on this?
On Jun 30, 1:55 pm, "Nathanael D. Jones" <
nathanael.jo...@gmail.com>
wrote:
> I used the sample django project. I tried using main.py fromhttp://
code.google.com/appengine/articles/django.html, but I recieved this
> error when I tried that:
>
> AssertionError at / Won't override attribute 'make_value_from_form' Request
> Method: GET Request URL:
http://micomments.com/ Exception Type:
> AssertionError Exception Value: Won't override attribute
> 'make_value_from_form' Exception Location:
> /base/python_lib/versions/1/google/appengine/ext/db/djangoforms.py
> in monkey_patch, line 127
> Traceback (innermost last) Switch to copy-and-paste
> view<
http://micomments.com/#>
>
> - /base/python_lib/versions/1/django/core/handlers/base.py in
> get_response
> 1. return response
> 2.
> 3. # Get urlconf from request object, if available. Otherwise use
> default.
> 4. urlconf = getattr(request, "urlconf", settings.ROOT_URLCONF)
> 5.
> 6. resolver = urlresolvers.RegexURLResolver(r'^/', urlconf)
> 7. try:
> 1. callback, callback_args, callback_kwargs =
> resolver.resolve(request.path) ...
> 1.
> 2. # Apply view middleware
> 3. for middleware_method in self._view_middleware:
> 4. response = middleware_method(request, callback, callback_args,
> callback_kwargs)
> 5. if response:
> 6. return response
> ▶ Local vars <
http://micomments.com/#>
> - /base/python_lib/versions/1/django/core/urlresolvers.py in resolve
> 1. self.default_kwargs = default_kwargs or {}
> 2.
> 3. def resolve(self, path):
> 4. tried = []
> 5. match = self.regex.search(path)
> 6. if match:
> 7. new_path = path[match.end():]
> 1. for pattern in self.urlconf_module.urlpatterns: ...
> 1. try:
> 2. sub_match = pattern.resolve(new_path)
> 3. except Resolver404, e:
> 4. tried.extend([(pattern.regex.pattern + ' ' + t) for t in
> e.args[0]['tried']])
> 5. else:
> 6. if sub_match:
> ▶ Local vars <
http://micomments.com/#>
> Variable
> Value
> match
> <_sre.SRE_Match object at 0x2b62f9e1da376960>
>
> new_path
> ''
>
> path
> '/'
>
> self
> <django.core.urlresolvers.RegexURLResolver object at 0x2b62f9e1da37d3b8>
>
> tried
> []
>
> - /base/python_lib/versions/1/django/core/urlresolvers.py in
> _get_urlconf_module
> 1. raise Resolver404, {'tried': tried, 'path': new_path}
> 2.
> 3. def _get_urlconf_module(self):
> 4. try:
> 5. return self._urlconf_module
> 6. except AttributeError:
> 7. try:
> 1. self._urlconf_module = __import__(self.urlconf_name, {}, {}, [''])
> ...
> 1. except ValueError, e:
> 2. # Invalid urlconf_name, such as "foo.bar." (note trailing period)
> 3. raise ImproperlyConfigured, "Error while importing URLconf %r: %s"
> % (self.urlconf_name, e)
> 4. return self._urlconf_module
> 5. urlconf_module = property(_get_urlconf_module)
> 6.
> ▶ Local vars <
http://micomments.com/#>
> Variable
> Value
> self
> <django.core.urlresolvers.RegexURLResolver object at 0x2b62f9e1da37d3b8>
>
> - /base/data/home/apps/micomments/1.5/urls.py in
> 1. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> 2. # See the License for the specific language governing permissions
> and
> 3. # limitations under the License.
> 4.
> 5.
> 6. from django.conf.urls.defaults import *
> 7.
> 1. from views import * ...
> 1. from models import *
> 2. from scriptviews import *
> 3.
> 4. urlpatterns = patterns(
> 5. '',
> 6. (r'^$', 'views.home' ),
> ▶ Local vars <
http://micomments.com/#>
> Seewww.python.orgfor more information., 'delattr': <built-in function
> - /base/python_lib/versions/1/google/appengine/ext/db/djangoforms.py in
>
> 1. assert name not in base.__dict__, "Won't override attribute %r" %
> (name,)
> 2. setattr(base, name, value)
> 3. return base
> 4.
> 5.
> 6.
> 7.
> 1. class Property(db.Property): ...
> 1. __metaclass__ = monkey_patch
> 2.
> 3. def get_form_field(self, form_class=forms.CharField, **kwargs):
> 4. """Return a Django form field appropriate for this property.
> 5.
> 6. Args:
> ▶ Local vars <
http://micomments.com/#>
> Seewww.python.orgfor more information., 'delattr': <built-in function
> - /base/python_lib/versions/1/google/appengine/ext/db/djangoforms.py in
> monkey_patch
> 1. it is recommended to give PatchClass the same name as TargetClass.
> 2. """
> 3.
> 4. assert len(bases) == 1, 'Exactly one base class is required'
> 5. base = bases[0]
> 6. for name, value in namespace.iteritems():
> 7. if name not in ('__metaclass__', '__module__'):
> 1. assert name not in base.__dict__, "Won't override attribute %r" %
> (name,) ...
> 1. setattr(base, name, value)
> 2. return base
> 3.
> 4.
> 5.
> 6.
> ▶ <
http://micomments.com/#>