[GeoNode-devel] after mass data import : "KeyError: 'request'" when clicking on a document

Haertel, Michael (IITA) M.Haertel at cgiar.org
Fri May 6 01:22:50 PDT 2016


Dear List,

I imported many datasets from a third party application into GeoNode by populating these database tables:


1.       Base_resourcebase

2.       Documents_document

3.       Base_contactrole

4.       Taggit_tag

5.       Taggit_taggeditem

6.       Base_link

However the link behind each document doesn't work. I get an "Internal server error". According to the log file the error is raised in
-----
File "/usr/lib/python2.7/dist-packages/django/template/context.py", line 56, in __getitem__

Raise KeyError(key)
KeyError: 'request'
-----
I noticed that when I click on a link to a PDF document for the first time after it has been imported, the column "doc_file" is altered and a suffix is appended to the pdf file on disk. So I also checked file permissions but "www-data" (linux)  can write all files there. It only happens for the datasets that I imported myself. Manually added documents work fine.

I also noticed that for Ids that were manually added and removed afterwards, the links (url: documents/<id>) still work and lead to a "file not found" page without any "internal server error" message. So GeoNode somehow knows which ids are valid (accessible) and which are not. Can somebody tell me how it works?

I am not yet very good in python yet and I don't want to debug the code at this point.

Thank you very much for your assistance,

Michael Haertel
GIS & Database Expert
International Institute of Tropical Agriculture (IITA, www.iita.org<../../../AppData/Local/Microsoft/Windows/Temporary%20Internet%20Files/Content.Outlook/AppData/Local/Microsoft/Windows/Temporary%20Internet%20Files/Content.Outlook/AppData/Local/Microsoft/Windows/Temporary%20Internet%20Files/Content.Outlook/AppData/Local/Microsoft/Windows/Temporary%20Internet%20Files/Content.Outlook/AppData/Local/Microsoft/Windows/Temporary%20Internet%20Files/Content.Outlook/AppData/Local/Microsoft/Windows/Temporary%20Internet%20Files/Content.Outlook/AppData/Local/Microsoft/Windows/Temporary%20Internet%20Files/Content.Outlook/AppData/Local/Microsoft/Windows/Temporary%20Internet%20Files/Content.Outlook/AppData/Local/Microsoft/Windows/Temporary%20Internet%20Files/Content.Outlook/FGKNP1ID/www.iita.org>)
Headquarters and West Africa Hub
PMB 5320, Oyo Road, Ibadan 200001, Oyo State, Nigeria
International Mailing Address: IITA Limited, Part 7th Floor, Grosvenor House, 125 High Street, Croydon, Surrey, CR0 9XP
Tel: +234 2 7517472  |  USA Tel: +1 201 6336094  |  Fax: +44 208 7113786
IITA is a member of the CGIAR Consortium (www.cgiar.org<../../../AppData/Local/Microsoft/Windows/Temporary%20Internet%20Files/Content.Outlook/AppData/Local/Microsoft/Windows/Temporary%20Internet%20Files/Content.Outlook/AppData/Local/Microsoft/Windows/Temporary%20Internet%20Files/Content.Outlook/AppData/Local/Microsoft/Windows/Temporary%20Internet%20Files/Content.Outlook/AppData/Local/Microsoft/Windows/Temporary%20Internet%20Files/Content.Outlook/AppData/Local/Microsoft/Windows/Temporary%20Internet%20Files/Content.Outlook/AppData/Local/Microsoft/Windows/Temporary%20Internet%20Files/Content.Outlook/AppData/Local/Microsoft/Windows/Temporary%20Internet%20Files/Content.Outlook/AppData/Local/Microsoft/Windows/Temporary%20Internet%20Files/Content.Outlook/FGKNP1ID/www.cgiar.org>)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-devel/attachments/20160506/9dcc7e80/attachment.html>


More information about the geonode-devel mailing list