[GeoNode-users] how to debug geonode

Eugenio Trumpy frippe12573 at hotmail.com
Mon Nov 2 02:08:11 PST 2015


Sorry I sent this email before finish it.

Following the last line:

then I run: python -m ipdb manage.py runserver

I entered in the ipdb shell, but now I don't know what I have to do to understand what does produce the error.
Can you help me?

Just to give you some more info, my sistem is ubuntu 14.04 server, apache is 2.4.7, tomcat is 7 and geonode 2.4.dev20151029080001.
Running my installation with the DEV server everythings works fine.

thank you

best

Eugenio



From: frippe12573 at hotmail.com
To: geonode-users at lists.osgeo.org
Subject: how to debug geonode
Date: Mon, 2 Nov 2015 10:38:36 +0100




Hello everybody,

unfortunately something is going wrong onmy geonode installation (it's a custom installation from git).
Actually almost all the functions are working, but the only one that gives me problem is the map save (I wrote the days before here in the list but any answer was good to solve this issue), so geonode developers suggested me to work with the IPDB debugger.

My issues is on the function to save maps. I got a generic 500 internal server error on saving from the geonode interface. Apache error log stated a segmentation fault on wsgi module. Although I got this error on saving maps, the application insert a record in the geonode DB, in fact I can see the map listed on the portal, however if I choose such map I got a page error reporting an error like: list index out of range. The apache error log reports:
[:error] [pid 30692] Internal Server Error: /maps/116
[Mon Oct 12 17:44:22.050107 2015] [:error] [pid 30692] Traceback (most recent call last):
[Mon Oct 12 17:44:22.050114 2015] [:error] [pid 30692]   File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 112, in get_response
[Mon Oct 12 17:44:22.050120 2015] [:error] [pid 30692]     response = wrapped_callback(request, *callback_args, **callback_kwargs)
[Mon Oct 12 17:44:22.050125 2015] [:error] [pid 30692]   File "/dati/geonode/geonode/maps/views.py", line 112, in map_detail
[Mon Oct 12 17:44:22.050130 2015] [:error] [pid 30692]     config = map_obj.viewer_json(request.user)
[Mon Oct 12 17:44:22.050135 2015] [:error] [pid 30692]   File "/dati/geonode/geonode/utils.py", line 265, in viewer_json
[Mon Oct 12 17:44:22.050140 2015] [:error] [pid 30692]     str(int(keys[-1]) + 1)] = settings.MAP_BASELAYERS[0]['source']
[Mon Oct 12 17:44:22.050145 2015] [:error] [pid 30692] IndexError: list index out of range

That's why I would like to debug geonode.
Unfortunately I never did it, reading something on the web I did as follow:

I put this line in the utils.py file after the lines which report BASELAYERS:

import ipdb; ipdb.set_trace()

 		 	   		   		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20151102/ded45cbf/attachment.html>


More information about the geonode-users mailing list