Export to GitHub

soc - issue #209

Attempt to save Site Settings raises an exception


Posted on Feb 25, 2009 by Grumpy Lion

It looks like the blog URL validator is failing for some reason, when I put in a Google Maps key.

Exception in request: Traceback (most recent call last): File "/base/data/home/apps/socghop/1.331676659990475823/django.zip/django/core/handlers/base.py", line 86, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/base/data/home/apps/socghop/1.331676659990475823/soc/views/models/site.py", line 168, in mainEdit return self.edit(request, "edit", page_name, seed=key_values, **key_values) File "/base/data/home/apps/socghop/1.331676659990475823/soc/views/helper/decorators.py", line 69, in wrapper return func(self, *args, **kwargs) File "/base/data/home/apps/socghop/1.331676659990475823/soc/views/helper/decorators.py", line 116, in wrapper return func(self, request, access_type, *args, **kwargs) File "/base/data/home/apps/socghop/1.331676659990475823/soc/views/models/base.py", line 325, in edit return self.editPost(request, entity, context, params=params) File "/base/data/home/apps/socghop/1.331676659990475823/soc/views/helper/decorators.py", line 69, in wrapper return func(self, *args, **kwargs) File "/base/data/home/apps/socghop/1.331676659990475823/soc/views/models/base.py", line 364, in editPost if not form.is_valid(): File "/base/data/home/apps/socghop/1.331676659990475823/django.zip/django/forms/forms.py", line 120, in is_valid return self.is_bound and not bool(self.errors) File "/base/data/home/apps/socghop/1.331676659990475823/django.zip/django/forms/forms.py", line 111, in _get_errors self.full_clean() File "/base/data/home/apps/socghop/1.331676659990475823/django.zip/django/forms/forms.py", line 234, in full_clean value = getattr(self, 'clean_%s' % name)() File "/base/data/home/apps/socghop/1.331676659990475823/soc/logic/cleaning.py", line 263, in clean_feed_url if not validate.isFeedURLValid(feed_url): File "/base/data/home/apps/socghop/1.331676659990475823/soc/logic/validate.py", line 40, in isFeedURLValid result = urlfetch.fetch(feed_url) File "/base/python_lib/versions/1/google/appengine/api/urlfetch.py", line 273, in fetch raise DownloadError(str(e)) DownloadError: ApplicationError: 5

Comment #1

Posted on Feb 25, 2009 by Grumpy Lion

Maybe there is something in the socghop Datastore that I need to clean up?

Comment #2

Posted on Feb 25, 2009 by Grumpy Lion

(No comment was entered for this change.)

Comment #3

Posted on Feb 25, 2009 by Happy Ox

This is caused by entering a urn to a blog that's broken somehow, we can fix this by putting try:... except around the urlfetch.fetch line.

Comment #4

Posted on Feb 25, 2009 by Grumpy Lion

I do not think this was triggered by a bad blog URL. I did not change the blog URL, and it was working on the home page before I tried to set the Google Maps key in the Site Settings.

Comment #5

Posted on Feb 25, 2009 by Happy Ox

It was caused by the url failing to be fetched, as such the urlfetch library raised an Exception that was not catched. Fixed in r2135.

Comment #6

Posted on Feb 26, 2009 by Grumpy Lion

Not quite fixed:

Exception in request: Traceback (most recent call last): File "/base/data/home/apps/socghop/0-4-20090224g3.331679764097863674/django.zip/django/core/handlers/base.py", line 86, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/base/data/home/apps/socghop/0-4-20090224g3.331679764097863674/soc/views/models/site.py", line 168, in mainEdit return self.edit(request, "edit", page_name, seed=key_values, **key_values) File "/base/data/home/apps/socghop/0-4-20090224g3.331679764097863674/soc/views/helper/decorators.py", line 69, in wrapper return func(self, *args, **kwargs) File "/base/data/home/apps/socghop/0-4-20090224g3.331679764097863674/soc/views/helper/decorators.py", line 116, in wrapper return func(self, request, access_type, *args, **kwargs) File "/base/data/home/apps/socghop/0-4-20090224g3.331679764097863674/soc/views/models/base.py", line 326, in edit return self.editPost(request, entity, context, params=params) File "/base/data/home/apps/socghop/0-4-20090224g3.331679764097863674/soc/views/helper/decorators.py", line 69, in wrapper return func(self, *args, **kwargs) File "/base/data/home/apps/socghop/0-4-20090224g3.331679764097863674/soc/views/models/base.py", line 365, in editPost if not form.is_valid(): File "/base/data/home/apps/socghop/0-4-20090224g3.331679764097863674/django.zip/django/forms/forms.py", line 120, in is_valid return self.is_bound and not bool(self.errors) File "/base/data/home/apps/socghop/0-4-20090224g3.331679764097863674/django.zip/django/forms/forms.py", line 111, in _get_errors self.full_clean() File "/base/data/home/apps/socghop/0-4-20090224g3.331679764097863674/django.zip/django/forms/forms.py", line 234, in full_clean value = getattr(self, 'clean_%s' % name)() File "/base/data/home/apps/socghop/0-4-20090224g3.331679764097863674/soc/logic/cleaning.py", line 263, in clean_feed_url if not validate.isFeedURLValid(feed_url): File "/base/data/home/apps/socghop/0-4-20090224g3.331679764097863674/soc/logic/validate.py", line 46, in isFeedURLValid except urlfetch_errors.Error, e: NameError: global name 'urlfetch_errors' is not defined

Comment #7

Posted on Feb 26, 2009 by Happy Ox

Heh, I guess that's what I get for trying to fix bugs while in a hurry to go to bed ;). I couldn't really test this because I had no way of simulating that error; a simple import from .... import ulfetch_errors should fix that.

Comment #8

Posted on Feb 26, 2009 by Happy Ox

Fixed in r2166.

Status: Fixed

Labels:
Type-Defect Priority-Critical Component-Logic Milestone-Live Program-universal