[GeoNode-users] Cant upload and register remote services after update

Simone Dalmasso simone.dalmasso at gmail.com
Fri Oct 30 08:58:14 PDT 2015


On demo.geonode.org 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.

2015-10-30 16:48 GMT+01:00 Charles Cossé <ccosse at gmail.com>:

> This commit looks like an attempt to clean-up but doesn't work b/c
> category form not being transmitted as needed:
> 0c3c1395dffb879d4dab10c77610008778d13bd7
> <https://github.com/GeoNode/geonode/commit/0c3c1395dffb879d4dab10c77610008778d13bd7#diff-36bc05580e37aef61b66c480db47cc38>
>
>
>
> On Fri, Oct 30, 2015 at 11:36 AM, Charles Cossé <ccosse at gmail.com> wrote:
>
>> 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).
>>
>>             try:
>>                 # Moved this inside the try/except block because it can
>> raise
>>                 # exceptions when unicode characters are present.
>>                 # This should be followed up in upstream Django.
>>                 tempdir, base_file = form.write_files()
>>                 logging.debug(request)
>>                 topic_id = request.META.get("HTTP_COOKIE")
>>                 topic_id = string.split(topic_id, " ")[0]
>>                 topic_id = string.split(topic_id, ":")[1]
>>                 topic_id = string.split(topic_id, ";")[0]
>>                 logging.debug(topic_id)
>>                 topic_category = TopicCategory.objects.get(
>>                     id=topic_id
>>                 )
>>                 saved_layer = file_upload(
>>                     base_file,
>>                     name=name,
>>                     user=request.user,
>>                     overwrite=False,
>>                     charset=form.cleaned_data["charset"],
>>                     abstract=form.cleaned_data["abstract"],
>>                     title=form.cleaned_data["layer_title"],
>>                 )
>>                 Layer.objects.filter(name=name).update(
>>                     category=topic_category
>>                 )
>>             except Exception as e:
>>                 exception_type, error, tb = sys.exc_info()
>>
>>
>> On Fri, Oct 30, 2015 at 10:59 AM, Christian Willmes <
>> christian.willmes at googlemail.com> wrote:
>>
>>> just to clarify, I tried the upload and register of remote service again
>>> after running "geonode collectstatic".
>>>
>>> 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.
>>>
>>> Any Ideas?
>>>
>>> Thanks,
>>> Christian
>>>
>>>
>>> Am 30.10.2015 um 15:02 schrieb Christian Willmes:
>>>
>>>> Hi,
>>>>
>>>> thanks, but it did not help. I did:
>>>> ---
>>>> ~$ geonode collectstatic
>>>>
>>>> You have requested to collect static files at the destination
>>>> location as specified in your settings.
>>>>
>>>> This will overwrite existing files!
>>>> Are you sure you want to do this?
>>>>
>>>> Type 'yes' to continue, or 'no' to cancel: yes
>>>>
>>>> 0 static files copied, 880 unmodified.
>>>> ---
>>>>
>>>> Errors in logs look exactly same, as posted in the mail before.
>>>>
>>>> Regards,
>>>> Christian
>>>>
>>>> Am 30.10.2015 um 14:57 schrieb Simone Dalmasso:
>>>>
>>>>> Christian. A geonode collectstatic may fix. Let us know
>>>>>
>>>>> Il venerdì 30 ottobre 2015, Christian Willmes <
>>>>> christian.willmes at googlemail.com <mailto:
>>>>> christian.willmes at googlemail.com>> ha scritto:
>>>>>
>>>>>     Hi,
>>>>>
>>>>>     I run a GeoNode /version 2.4c2 /from the ubuntu packages./
>>>>>
>>>>>     /After an "apt-get update / upgrade" yesterday, I can't upload new
>>>>>     layers or register remote services on GeoNode anymore.
>>>>>     /
>>>>>     /On registering remote services the logs say:
>>>>>
>>>>>     [Fri Oct 30 13:24:41.857736 2015] [core:error] [pid 24951:tid
>>>>>     140094098888448] [client 134.95.126.26:38719
>>>>>     <http://134.95.126.26:38719>] End of script output before headers:
>>>>>     geonode.wsgi
>>>>>     [Fri Oct 30 13:24:41.857932 2015] [core:error] [pid 25013:tid
>>>>>     140094014961408] [client 134.95.126.26:38714
>>>>>     <http://134.95.126.26:38714>] End of script output before headers:
>>>>>     geonode.wsgi
>>>>>     [Fri Oct 30 13:24:41.858108 2015] [core:error] [pid 24951:tid
>>>>>     140094090495744] [client 127.0.0.1:36688 <http://127.0.0.1:36688>]
>>>>>     End of script output before headers: geonode.wsgi
>>>>>     [Fri Oct 30 13:24:41.858290 2015] [core:error] [pid 24951:tid
>>>>>     140094073710336] [client 134.95.126.26:38467
>>>>>     <http://134.95.126.26:38467>] End of script output before headers:
>>>>>     geonode.wsgi
>>>>>     [Fri Oct 30 13:24:41.858455 2015] [core:error] [pid 24951:tid
>>>>>     140094006568704] [client 134.95.126.26:38447
>>>>>     <http://134.95.126.26:38447>] End of script output before headers:
>>>>>     geonode.wsgi
>>>>>     [Fri Oct 30 13:24:41.858625 2015] [core:error] [pid 25013:tid
>>>>>     140094115673856] [client 134.95.126.26:38399
>>>>>     <http://134.95.126.26:38399>] End of script output before headers:
>>>>>     geonode.wsgi
>>>>>     [Fri Oct 30 13:24:41.858788 2015] [core:error] [pid 25013:tid
>>>>>     140093914248960] [client 134.95.126.26:38411
>>>>>     <http://134.95.126.26:38411>] End of script output before headers:
>>>>>     geonode.wsgi
>>>>>     [Fri Oct 30 13:24:41.858963 2015] [core:error] [pid 25013:tid
>>>>>     140093939427072] [client 134.95.126.26:38433
>>>>>     <http://134.95.126.26:38433>] End of script output before headers:
>>>>>     geonode.wsgi
>>>>>     [Fri Oct 30 13:24:41.859267 2015] [core:error] [pid 25013:tid
>>>>>     140093964605184] [client 134.95.126.26:38350
>>>>>     <http://134.95.126.26:38350>] End of script output before headers:
>>>>>     geonode.wsgi
>>>>>     [Fri Oct 30 13:24:41.859403 2015] [core:error] [pid 24951:tid
>>>>>     140093922641664] [client 134.95.150.136:37065
>>>>>     <http://134.95.150.136:37065>] End of script output before
>>>>>     headers: geonode.wsgi, referer:
>>>>>     http://geonode.crc806db.uni-koeln.de/services/register/
>>>>>
>>>>>
>>>>>     On upload via the web gui, the logs say:
>>>>>
>>>>>     [Fri Oct 30 07:50:58.506998 2015] [:error] [pid 1277:tid
>>>>>     139701666780928] "'category'"
>>>>>     [Fri Oct 30 07:50:58.507085 2015] [:error] [pid 1277:tid
>>>>>     139701666780928] Traceback (most recent call last):
>>>>>     [Fri Oct 30 07:50:58.507097 2015] [:error] [pid 1277:tid
>>>>>     139701666780928]   File
>>>>> "/usr/local/lib/python2.7/dist-packages/geonode/layers/views.py",
>>>>>     line 154, in layer_upload
>>>>>     [Fri Oct 30 07:50:58.507106 2015] [:error] [pid 1277:tid
>>>>>     139701666780928]     topic_id = request.POST['category']
>>>>>     [Fri Oct 30 07:50:58.507115 2015] [:error] [pid 1277:tid
>>>>>     139701666780928]   File
>>>>> "/usr/lib/python2.7/dist-packages/django/utils/datastructures.py",
>>>>>     line 301, in __getitem__
>>>>>     [Fri Oct 30 07:50:58.507126 2015] [:error] [pid 1277:tid
>>>>>     139701666780928]     raise MultiValueDictKeyError(repr(key))
>>>>>     [Fri Oct 30 07:50:58.507139 2015] [:error] [pid 1277:tid
>>>>>     139701666780928] MultiValueDictKeyError: "'category'"
>>>>>
>>>>>     Is there any step I need to do manually after an package upgrade?
>>>>>     I remember similar problems after the last update, then it was a
>>>>>     problem with "uploadsession" not "category" during upload layers.
>>>>>
>>>>>     Thanks and regards,
>>>>>     Christian
>>>>>     _______________________________________________
>>>>>     geonode-users mailing list
>>>>>     geonode-users at lists.osgeo.org
>>>>>     http://lists.osgeo.org/mailman/listinfo/geonode-users
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Simone
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> geonode-users mailing list
>>>>> geonode-users at lists.osgeo.org
>>>>> http://lists.osgeo.org/mailman/listinfo/geonode-users
>>>>>
>>>>
>>>>
>>> _______________________________________________
>>> geonode-users mailing list
>>> geonode-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/geonode-users
>>>
>>
>>
>
> _______________________________________________
> geonode-users mailing list
> geonode-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geonode-users
>
>


-- 
Simone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20151030/519dd9c6/attachment-0001.html>


More information about the geonode-users mailing list