[Booki-dev] Re : Re : GoogleBot and django errors
Nicolas Dufour
nicoduf at yahoo.fr
Fri Dec 2 23:19:57 PST 2011
Google Bot strikes back! 18 new error reports due to its activity last night. Not huge, but a bit annoying for sysadmins ;)
Fortunately, there are only two new distinct causes:
--------
1. Access to chapters in feeds (ie 'http://fr.flossmanuals.net/ecrire/feeds/atom/chapter/inkscape/inkscape/', but very likely to break with rss too).
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py", line 100, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/contrib/syndication/views.py", line 35, in __call__
obj = self.get_object(request, *args, **kwargs)
TypeError: get_object() got an unexpected keyword argument 'chapterid'
--------
2. Access to books with multiple chapters with the same name (ie ''http://fr.flossmanuals.net/ecrire/support-de-formation-scribus-1/introduction/).
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py", line 100, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/home/flossmanualsfr/Booki/lib/booki/reader/views.py", line 178, in book_chapter
content = models.Chapter.objects.get(version=book_version, url_title = chapter)
File "/usr/local/lib/python2.6/dist-packages/django/db/models/manager.py", line 132, in get
return self.get_query_set().get(*args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/db/models/query.py", line 349, in get
% (self.model._meta.object_name, num, kwargs))
MultipleObjectsReturned:
get() returned more than one Chapter -- it returned 2! Lookup
parameters were {'version': <BookVersion: 1.0 (initial)>,
'url_title': u'introduction'}
--------
I'm a bit surprised nobody else noticed that kind of errors. Do other sites have workarounds or fixes already implemented?
Maybe it's possible to hide some content to Google Bot? It wouldn't fix the issue, but at least it would prevent the bot from accessing invalid pages.
Regards,
--
Nicolas
More information about the Booki-dev
mailing list