<div dir="ltr">Hi, could you post the full trace of the error? is in /var/logs/apache2/error.log</div><div class="gmail_extra"><br><div class="gmail_quote">2016-05-06 10:22 GMT+02:00 Haertel, Michael (IITA) <span dir="ltr"><<a href="mailto:M.Haertel@cgiar.org" target="_blank">M.Haertel@cgiar.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal">Dear List,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I imported many datasets from a third party application into GeoNode by populating these database tables:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p><u></u><span>1.<span style="font:7.0pt "Times New Roman"">
</span></span><u></u>Base_resourcebase<u></u><u></u></p>
<p><u></u><span>2.<span style="font:7.0pt "Times New Roman"">
</span></span><u></u>Documents_document<u></u><u></u></p>
<p><u></u><span>3.<span style="font:7.0pt "Times New Roman"">
</span></span><u></u>Base_contactrole<u></u><u></u></p>
<p><u></u><span>4.<span style="font:7.0pt "Times New Roman"">
</span></span><u></u>Taggit_tag<u></u><u></u></p>
<p><u></u><span>5.<span style="font:7.0pt "Times New Roman"">
</span></span><u></u>Taggit_taggeditem<u></u><u></u></p>
<p><u></u><span>6.<span style="font:7.0pt "Times New Roman"">
</span></span><u></u>Base_link<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">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
<u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d">-----</span><u></u><u></u></p>
<p class="MsoNormal">File "/usr/lib/python2.7/dist-packages/django/template/context.py", line 56, in __getitem__<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Raise KeyError(key)<u></u><u></u></p>
<p class="MsoNormal">KeyError: ‘request’<u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d">-----</span><u></u><u></u></p>
<p class="MsoNormal">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.
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">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?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I am not yet very good in python yet and I don’t want to debug the code at this point.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thank you very much for your assistance,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Michael Haertel</span></b><span style="font-size:10.0pt;font-family:"Arial","sans-serif""><u></u><u></u></span></p>
<p class="MsoNormal"><i><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#4a452a">GIS & Database Expert</span></i><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#4a452a">International Institute of Tropical Agriculture (IITA,
</span></b><span style="font-size:10.0pt;font-family:"Arial","sans-serif""><a href="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" target="_blank"><b>www.iita.org</b></a><b><span style="color:#4a452a">)<u></u><u></u></span></b></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Headquarters and West Africa Hub<span style="color:black"><u></u><u></u></span></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">PMB 5320, Oyo Road, Ibadan 200001, Oyo State, Nigeria<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">International Mailing Address: IITA Limited, Part 7th Floor, Grosvenor House, 125 High Street, Croydon, Surrey, CR0 9XP<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Arial","sans-serif"">Tel: <a href="tel:%2B234%202%207517472" value="+23427517472" target="_blank">+234 2 7517472</a> | USA Tel: <a href="tel:%2B1%20201%206336094" value="+12016336094" target="_blank">+1 201 6336094</a> | Fax: <a href="tel:%2B44%20208%207113786" value="+442087113786" target="_blank">+44 208 7113786</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">IITA is a member of the CGIAR Consortium</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Arial","sans-serif""> (</span><span style="font-size:10.0pt;font-family:"Arial","sans-serif""><a href="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" target="_blank"><span lang="EN-GB">www.cgiar.org</span></a></span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Arial","sans-serif"">)</span><span style="font-size:10.0pt;font-family:"Arial","sans-serif""><u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<br>_______________________________________________<br>
geonode-devel mailing list<br>
<a href="mailto:geonode-devel@lists.osgeo.org">geonode-devel@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/geonode-devel" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/geonode-devel</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Simone </div>
</div>