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

Simone Dalmasso simone.dalmasso at gmail.com
Fri May 6 01:35:41 PDT 2016


Hi, could you post the full trace of the error? is in
/var/logs/apache2/error.log

2016-05-06 10:22 GMT+02:00 Haertel, Michael (IITA) <M.Haertel at cgiar.org>:

> 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*
> <http://../../../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
> <http://../../../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>
> )
>
>
>
> _______________________________________________
> geonode-devel mailing list
> geonode-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geonode-devel
>
>


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


More information about the geonode-devel mailing list