<div dir="ltr">On <a href="http://demo.geonode.org">demo.geonode.org</a> I don't see issues on upload. Christian, this time there hasn't been any data model change so it's only a template + javascript + python code. An upgrade and apache restart should be sufficient....not sure what's wrong there.</div><div class="gmail_extra"><br><div class="gmail_quote">2015-10-30 16:48 GMT+01:00 Charles Cossé <span dir="ltr"><<a href="mailto:ccosse@gmail.com" target="_blank">ccosse@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">This commit looks like an attempt to clean-up but doesn't work b/c category form not being transmitted as needed:<br><a href="https://github.com/GeoNode/geonode/commit/0c3c1395dffb879d4dab10c77610008778d13bd7#diff-36bc05580e37aef61b66c480db47cc38" target="_blank">0c3c1395dffb879d4dab10c77610008778d13bd7</a><br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 30, 2015 at 11:36 AM, Charles Cossé <span dir="ltr"><<a href="mailto:ccosse@gmail.com" target="_blank">ccosse@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi, I may be somewhat implicated in this. This is what I have in my layers/views.py around the Line#154 in your error message. It is different than what's in git at the moment, and I'm not sure why. The below is a hack, for sure, which was awaiting more insight into getting the category_form returned from layers_upload.html ... nonetheless, if you replace the topic_id retrieval section in your views.py I suspect it will work. Meanwhile the views.py on github appears that it cannot work as-is ... will look into it more later. (what might have happened was a revert b/c multiple categories not handled, but reverted to previous broken version, ie. not far enough back). <br><br> try:<br> # Moved this inside the try/except block because it can raise<br> # exceptions when unicode characters are present.<br> # This should be followed up in upstream Django.<br> tempdir, base_file = form.write_files()<br> logging.debug(request)<br> topic_id = request.META.get("HTTP_COOKIE")<br> topic_id = string.split(topic_id, " ")[0]<br> topic_id = string.split(topic_id, ":")[1]<br> topic_id = string.split(topic_id, ";")[0]<br> logging.debug(topic_id)<br> topic_category = TopicCategory.objects.get(<br> id=topic_id<br> )<br> saved_layer = file_upload(<br> base_file,<br> name=name,<br> user=request.user,<br> overwrite=False,<br> charset=form.cleaned_data["charset"],<br> abstract=form.cleaned_data["abstract"],<br> title=form.cleaned_data["layer_title"],<br> )<br> Layer.objects.filter(name=name).update(<br> category=topic_category<br> )<br> except Exception as e:<br> exception_type, error, tb = sys.exc_info() <br><br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 30, 2015 at 10:59 AM, Christian Willmes <span dir="ltr"><<a href="mailto:christian.willmes@googlemail.com" target="_blank">christian.willmes@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">just to clarify, I tried the upload and register of remote service again after running "geonode collectstatic".<br>
<br>
I also made sure to select a category from the GUI, but for testing also tryed to upload without selecting a category, both resulting in the exact same errors in the logs.<br>
<br>
Any Ideas?<br>
<br>
Thanks,<br>
Christian<div><div><br>
<br>
Am 30.10.2015 um 15:02 schrieb Christian Willmes:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
thanks, but it did not help. I did:<br>
---<br>
~$ geonode collectstatic<br>
<br>
You have requested to collect static files at the destination<br>
location as specified in your settings.<br>
<br>
This will overwrite existing files!<br>
Are you sure you want to do this?<br>
<br>
Type 'yes' to continue, or 'no' to cancel: yes<br>
<br>
0 static files copied, 880 unmodified.<br>
---<br>
<br>
Errors in logs look exactly same, as posted in the mail before.<br>
<br>
Regards,<br>
Christian<br>
<br>
Am 30.10.2015 um 14:57 schrieb Simone Dalmasso:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Christian. A geonode collectstatic may fix. Let us know<br>
<br>
Il venerdì 30 ottobre 2015, Christian Willmes <<a href="mailto:christian.willmes@googlemail.com" target="_blank">christian.willmes@googlemail.com</a> <mailto:<a href="mailto:christian.willmes@googlemail.com" target="_blank">christian.willmes@googlemail.com</a>>> ha scritto:<br>
<br>
Hi,<br>
<br>
I run a GeoNode /version 2.4c2 /from the ubuntu packages./<br>
<br>
/After an "apt-get update / upgrade" yesterday, I can't upload new<br>
layers or register remote services on GeoNode anymore.<br>
/<br>
/On registering remote services the logs say:<br>
<br>
[Fri Oct 30 13:24:41.857736 2015] [core:error] [pid 24951:tid<br>
140094098888448] [client <a href="http://134.95.126.26:38719" rel="noreferrer" target="_blank">134.95.126.26:38719</a><br>
<<a href="http://134.95.126.26:38719" rel="noreferrer" target="_blank">http://134.95.126.26:38719</a>>] End of script output before headers:<br>
geonode.wsgi<br>
[Fri Oct 30 13:24:41.857932 2015] [core:error] [pid 25013:tid<br>
140094014961408] [client <a href="http://134.95.126.26:38714" rel="noreferrer" target="_blank">134.95.126.26:38714</a><br>
<<a href="http://134.95.126.26:38714" rel="noreferrer" target="_blank">http://134.95.126.26:38714</a>>] End of script output before headers:<br>
geonode.wsgi<br>
[Fri Oct 30 13:24:41.858108 2015] [core:error] [pid 24951:tid<br>
140094090495744] [client <a href="http://127.0.0.1:36688" rel="noreferrer" target="_blank">127.0.0.1:36688</a> <<a href="http://127.0.0.1:36688" rel="noreferrer" target="_blank">http://127.0.0.1:36688</a>>]<br>
End of script output before headers: geonode.wsgi<br>
[Fri Oct 30 13:24:41.858290 2015] [core:error] [pid 24951:tid<br>
140094073710336] [client <a href="http://134.95.126.26:38467" rel="noreferrer" target="_blank">134.95.126.26:38467</a><br>
<<a href="http://134.95.126.26:38467" rel="noreferrer" target="_blank">http://134.95.126.26:38467</a>>] End of script output before headers:<br>
geonode.wsgi<br>
[Fri Oct 30 13:24:41.858455 2015] [core:error] [pid 24951:tid<br>
140094006568704] [client <a href="http://134.95.126.26:38447" rel="noreferrer" target="_blank">134.95.126.26:38447</a><br>
<<a href="http://134.95.126.26:38447" rel="noreferrer" target="_blank">http://134.95.126.26:38447</a>>] End of script output before headers:<br>
geonode.wsgi<br>
[Fri Oct 30 13:24:41.858625 2015] [core:error] [pid 25013:tid<br>
140094115673856] [client <a href="http://134.95.126.26:38399" rel="noreferrer" target="_blank">134.95.126.26:38399</a><br>
<<a href="http://134.95.126.26:38399" rel="noreferrer" target="_blank">http://134.95.126.26:38399</a>>] End of script output before headers:<br>
geonode.wsgi<br>
[Fri Oct 30 13:24:41.858788 2015] [core:error] [pid 25013:tid<br>
140093914248960] [client <a href="http://134.95.126.26:38411" rel="noreferrer" target="_blank">134.95.126.26:38411</a><br>
<<a href="http://134.95.126.26:38411" rel="noreferrer" target="_blank">http://134.95.126.26:38411</a>>] End of script output before headers:<br>
geonode.wsgi<br>
[Fri Oct 30 13:24:41.858963 2015] [core:error] [pid 25013:tid<br>
140093939427072] [client <a href="http://134.95.126.26:38433" rel="noreferrer" target="_blank">134.95.126.26:38433</a><br>
<<a href="http://134.95.126.26:38433" rel="noreferrer" target="_blank">http://134.95.126.26:38433</a>>] End of script output before headers:<br>
geonode.wsgi<br>
[Fri Oct 30 13:24:41.859267 2015] [core:error] [pid 25013:tid<br>
140093964605184] [client <a href="http://134.95.126.26:38350" rel="noreferrer" target="_blank">134.95.126.26:38350</a><br>
<<a href="http://134.95.126.26:38350" rel="noreferrer" target="_blank">http://134.95.126.26:38350</a>>] End of script output before headers:<br>
geonode.wsgi<br>
[Fri Oct 30 13:24:41.859403 2015] [core:error] [pid 24951:tid<br>
140093922641664] [client <a href="http://134.95.150.136:37065" rel="noreferrer" target="_blank">134.95.150.136:37065</a><br>
<<a href="http://134.95.150.136:37065" rel="noreferrer" target="_blank">http://134.95.150.136:37065</a>>] End of script output before<br>
headers: geonode.wsgi, referer:<br>
<a href="http://geonode.crc806db.uni-koeln.de/services/register/" rel="noreferrer" target="_blank">http://geonode.crc806db.uni-koeln.de/services/register/</a><br>
<br>
<br>
On upload via the web gui, the logs say:<br>
<br>
[Fri Oct 30 07:50:58.506998 2015] [:error] [pid 1277:tid<br>
139701666780928] "'category'"<br>
[Fri Oct 30 07:50:58.507085 2015] [:error] [pid 1277:tid<br>
139701666780928] Traceback (most recent call last):<br>
[Fri Oct 30 07:50:58.507097 2015] [:error] [pid 1277:tid<br>
139701666780928] File<br>
"/usr/local/lib/python2.7/dist-packages/geonode/layers/views.py",<br>
line 154, in layer_upload<br>
[Fri Oct 30 07:50:58.507106 2015] [:error] [pid 1277:tid<br>
139701666780928] topic_id = request.POST['category']<br>
[Fri Oct 30 07:50:58.507115 2015] [:error] [pid 1277:tid<br>
139701666780928] File<br>
"/usr/lib/python2.7/dist-packages/django/utils/datastructures.py",<br>
line 301, in __getitem__<br>
[Fri Oct 30 07:50:58.507126 2015] [:error] [pid 1277:tid<br>
139701666780928] raise MultiValueDictKeyError(repr(key))<br>
[Fri Oct 30 07:50:58.507139 2015] [:error] [pid 1277:tid<br>
139701666780928] MultiValueDictKeyError: "'category'"<br>
<br>
Is there any step I need to do manually after an package upgrade?<br>
I remember similar problems after the last update, then it was a<br>
problem with "uploadsession" not "category" during upload layers.<br>
<br>
Thanks and regards,<br>
Christian<br>
_______________________________________________<br>
geonode-users mailing list<br>
<a href="mailto:geonode-users@lists.osgeo.org" target="_blank">geonode-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/geonode-users" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/geonode-users</a><br>
<br>
<br>
<br>
-- <br>
Simone<br>
<br>
<br>
_______________________________________________<br>
geonode-users mailing list<br>
<a href="mailto:geonode-users@lists.osgeo.org" target="_blank">geonode-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/geonode-users" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/geonode-users</a><br>
</blockquote>
<br>
</blockquote>
<br>
_______________________________________________<br>
geonode-users mailing list<br>
<a href="mailto:geonode-users@lists.osgeo.org" target="_blank">geonode-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/geonode-users" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/geonode-users</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
<br>_______________________________________________<br>
geonode-users mailing list<br>
<a href="mailto:geonode-users@lists.osgeo.org">geonode-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/geonode-users" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/geonode-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Simone </div>
</div>