[Booki-dev] GoogleBot and django errors

Aleksandar Erkalovic aerkalov at gmail.com
Fri Dec 2 11:39:16 PST 2011


hi,

i fixed this bug in master repository. you can pull the changes or
manualy change your file:
/home/flossmanualsfr/Booki/lib/sputnik/views.py  line 37 into
messages = simplejson.loads(inp.get("messages", "[]"))

that will fix the problem.

aco


On Fri, Dec 2, 2011 at 7:47 PM, Nicolas Dufour <nicoduf at yahoo.fr> wrote:
> Hi,
>
> The French site is currently affected by a bug in booki that produces django
> errors when accessing some pages, such as
> http://fr.flossmanuals.net/ecrire/_sputnik/ or
> /ecrire/feeds/atom/chapter/doudoulinux/doudoulinux/ (among others, with
> various django errors). Of course, we don't need to access to these pages
> directly, but that's what GoogleBot is trying to do... and the root user
> (redirected to Elisa and me) receive lots of error messages*.
>
> Does someone already noticed that behavior with FMen or FMfi?
> Of course, I would be great if it could be fixed in Django, but any
> workaround is welcome.
> Regards.
> --
> Nicolas
>
> * Example with _sputnik (shortened):
>
> Subject: [Django] Error (EXTERNAL IP): /ecrire/_sputnik/
> ...
> Traceback (most recent call last):
>
>   File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py=
> ", line 100, in get_response
>     response =3D callback(request, *callback_args, **callback_kwargs)
>
>   File "/usr/local/lib/python2.6/dist-packages/django/db/transaction.py", l=
> ine 338, in _commit_manually
>     return func(*args, **kw)
>
>   File "/home/flossmanualsfr/Booki/lib/sputnik/views.py", line 37, in dispa=
> tcher
>     messages =3D simplejson.loads(inp["messages"])
>
>   File "/usr/local/lib/python2.6/dist-packages/django/utils/datastructures.=
> py", line 235, in __getitem__
>     raise MultiValueDictKeyError("Key %r not found in %r" % (key, self))
>
> MultiValueDictKeyError: "Key 'messages' not found in <QueryDict: {}>"
>
> <WSGIRequest
> GET:<QueryDict: {}>,
> POST:<QueryDict: {}>,
> COOKIES:{},
> META:{'DOCUMENT_ROOT': '/var/www/publisher/',
> 'GATEWAY_INTERFACE': 'CGI/1.1',
> 'HTTP_ACCEPT': '*/*',
> 'HTTP_ACCEPT_ENCODING': 'gzip,deflate',
> 'HTTP_CONNECTION': 'Keep-alive',
> 'HTTP_FROM': 'googlebot(at)googlebot.com',
> 'HTTP_HOST': 'fr.flossmanuals.net',
> 'HTTP_USER_AGENT': 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.go=
> ogle.com/bot.html)',
> 'LANG': 'fr_FR.UTF-8',
> 'LC_TIME': 'fr_FR.UTF-8',
> 'PATH_INFO': u'/_sputnik/',
> 'PATH_TRANSLATED': 'redirect:/index.php/',
> 'QUERY_STRING': '',
> 'REMOTE_ADDR': '66.249.71.155',
> 'REMOTE_PORT': '64458',
> 'REQUEST_METHOD': 'GET',
> 'REQUEST_URI': '/ecrire/_sputnik/',
> 'SCRIPT_FILENAME': '/var/www/mybooki/booki.wsgi',
> 'SCRIPT_NAME': u'/ecrire',
> 'SERVER_ADDR': '88.191.79.230',
> 'SERVER_ADMIN': '[no address given]',
> 'SERVER_NAME': 'fr.flossmanuals.net',
> 'SERVER_PORT': '80',
> 'SERVER_PROTOCOL': 'HTTP/1.1',
> 'SERVER_SIGNATURE': '<address>Apache/2.2.16 (Debian) Server at fr.flossman=
> uals.net Port 80</address>\n',
> 'SERVER_SOFTWARE': 'Apache/2.2.16 (Debian)',
> ...
>
>
> _______________________________________________
> Booki-dev mailing list
> Booki-dev at lists.flossmanuals.net
> http://lists.flossmanuals.net/listinfo.cgi/booki-dev-flossmanuals.net
>



-- 
 http://www.binarni.net/



More information about the Booki-dev mailing list