<div dir="ltr">ok then you can follow some tutorials like <a href="https://www.safaribooksonline.com/blog/2014/11/18/intro-python-debugger/">https://www.safaribooksonline.com/blog/2014/11/18/intro-python-debugger/</a> to inspect that state of the variables.</div><div class="gmail_extra"><br><div class="gmail_quote">2015-09-29 18:13 GMT+02:00 Eugenio Trumpy <span dir="ltr"><<a href="mailto:frippe12573@hotmail.com" target="_blank">frippe12573@hotmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr">Actually I think I'm not using virtualenv.<br>I cloned geonode directly in a directory.<br>By the way I think I can debug from my geonode directory, isn't it?<br>I think I installed ipdb correctly, maybe I miss the right commands<br>to debug my settings.py file.<br><br>Can you drive me into the geonode debug?<br><br>Thank you <br>E.<br><br><div><hr>From: <a href="mailto:simone.dalmasso@gmail.com" target="_blank">simone.dalmasso@gmail.com</a><br>Date: Tue, 29 Sep 2015 17:57:29 +0200<div><div class="h5"><br>Subject: Re: [GeoNode-users] post-installation issues<br>To: <a href="mailto:frippe12573@hotmail.com" target="_blank">frippe12573@hotmail.com</a><br>CC: <a href="mailto:geonode-users@lists.osgeo.org" target="_blank">geonode-users@lists.osgeo.org</a><br><br><div dir="ltr">Sorry, just use "pip install ipdb" in your virtualenv. <div><div>Ipdb should be put in the code in your development environment so that you can test using python manage.py runserver with the same configurations that you have in productions.</div></div><div><br></div></div><div><br><div>2015-09-29 17:51 GMT+02:00 Eugenio Trumpy <span dir="ltr"><<a href="mailto:frippe12573@hotmail.com" target="_blank">frippe12573@hotmail.com</a>></span>:<br><blockquote style="border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr">I have problems on using ipdb. I installed it by using easy_install,<br>then I launched the python console: python manage.py shell<br>after that I tried to import ipdb and ipdb.set_trace()<br>but something went wrong:<br>>>> import ipdb; ipdb.set_trace()<br>Traceback (most recent call last):<br> File "<console>", line 1, in <module><br> File "/usr/local/lib/python2.7/dist-packages/ipdb-0.8.1-py2.7.egg/ipdb/__init__.py", line 16, in <module><br> from ipdb.__main__ import set_trace, post_mortem, pm, run, runcall, runeval, launch_ipdb_on_exception<br> File "/usr/local/lib/python2.7/dist-packages/ipdb-0.8.1-py2.7.egg/ipdb/__main__.py", line 27, in <module><br> import IPython<br> File "/usr/local/lib/python2.7/dist-packages/ipython-4.0.0-py2.7.egg/IPython/__init__.py", line 47, in <module><br> from .core.application import Application<br> File "/usr/local/lib/python2.7/dist-packages/ipython-4.0.0-py2.7.egg/IPython/core/application.py", line 24, in <module><br> from IPython.core import release, crashhandler<br> File "/usr/local/lib/python2.7/dist-packages/ipython-4.0.0-py2.7.egg/IPython/core/crashhandler.py", line 28, in <module><br> from IPython.core import ultratb<br> File "/usr/local/lib/python2.7/dist-packages/ipython-4.0.0-py2.7.egg/IPython/core/ultratb.py", line 116, in <module><br> from IPython.utils import path as util_path<br> File "/usr/local/lib/python2.7/dist-packages/ipython-4.0.0-py2.7.egg/IPython/utils/path.py", line 19, in <module><br> from IPython.utils.process import system<br> File "/usr/local/lib/python2.7/dist-packages/ipython-4.0.0-py2.7.egg/IPython/utils/process.py", line 19, in <module><br> from ._process_posix import system, getoutput, arg_split, check_pid<br> File "/usr/local/lib/python2.7/dist-packages/ipython-4.0.0-py2.7.egg/IPython/utils/_process_posix.py", line 24, in <module><br> import pexpect<br>ImportError: No module named pexpect<br><br>Something is still missing?<br><br>E.<br><br><br><div><hr>From: <a href="mailto:simone.dalmasso@gmail.com" target="_blank">simone.dalmasso@gmail.com</a><br>Date: Tue, 29 Sep 2015 17:18:44 +0200<span><br>Subject: Re: [GeoNode-users] post-installation issues<br></span>To: <a href="mailto:frippe12573@hotmail.com" target="_blank">frippe12573@hotmail.com</a>; <a href="mailto:geonode-users@lists.osgeo.org" target="_blank">geonode-users@lists.osgeo.org</a><div><div><br><br><div dir="ltr">The list seems ok. <div>You can try to install ipdb <a href="https://pypi.python.org/pypi/ipdb" target="_blank">https://pypi.python.org/pypi/ipdb</a> and add</div><div>import ipdb; ipdb.set_trace()</div><div>at line 264. then go one step down with "n" and see what's wrong there. You can access the variables and see which lookup fails at line 266. It can be either </div><div><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap;background-color:rgb(248,238,199)">keys[</span><span style="color:rgb(167,29,93);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap">-</span><span style="color:rgb(0,134,179);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap">1]</span><br></div><div><span style="color:rgb(0,134,179);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap">or</span></div><div><span style="color:rgb(0,134,179);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap"><span style="color:rgb(51,51,51);line-height:16.8px;background-color:rgb(248,238,199)">settings.MAP_BASELAYERS[</span><span style="line-height:16.8px">0</span><span style="color:rgb(51,51,51);line-height:16.8px;background-color:rgb(248,238,199)">][</span><span style="color:rgb(24,54,145);line-height:16.8px"><span>'</span>source<span>'</span></span><span style="color:rgb(51,51,51);line-height:16.8px;background-color:rgb(248,238,199)">]</span><br></span></div><div><span style="color:rgb(0,134,179);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre-wrap"><span style="color:rgb(51,51,51);line-height:16.8px;background-color:rgb(248,238,199)"><br></span></span></div><div><font face="arial, helvetica, sans-serif" color="#000000"><span style="font-size:12px;line-height:16.8px;white-space:pre-wrap">For geoserver, it has an admin user that is used by geonode and no others should use it. For security reasons it is recommended to change it's credentials in settings and the geoserver users page. but normal administrators will always use their geonode accounts to access geoserver.</span></font></div></div><div><br><div>2015-09-29 16:55 GMT+02:00 Eugenio Trumpy <span dir="ltr"><<a href="mailto:frippe12573@hotmail.com" target="_blank">frippe12573@hotmail.com</a>></span>:<br><blockquote style="border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr">Hi,<br><br>I had these lines:<br>>>> from django.conf import settings<br>>>> settings.MAP_BASELAYERS<br>[{'source': {'url': '<a href="http://my_server_name/geoserver2/wms" target="_blank">http://my_server_name/geoserver2/wms</a>', 'restUrl': '/gs/rest', 'ptype': 'gxp_wmscsource'}}, {'group': 'background', 'args': ['No background'], 'visibility': False, 'source': {'ptype': 'gxp_olsource'}, 'fixed': True, 'type': 'OpenLayers.Layer'}, {'group': 'background', 'name': 'mapnik', 'visibility': False, 'source': {'ptype': 'gxp_osmsource'}, 'fixed': True, 'type': 'OpenLayers.Layer.OSM'}, {'source': {'ptype': 'gxp_mapquestsource'}, 'group': 'background', 'name': 'osm', 'visibility': True}, {'source': {'ptype': 'gxp_mapquestsource'}, 'group': 'background', 'name': 'naip', 'visibility': False}, {'source': {'ptype': 'gxp_bingsource'}, 'fixed': True, 'group': 'background', 'name': 'AerialWithLabels', 'visibility': False}, {'source': {'ptype': 'gxp_mapboxsource'}}]<br>>>> <br><br>Is that correct?<br><br>Regarding the second question, I see geoserver keeps the user from django, I don't understand if I have to change the user of geoserver in settings.py and local_settings.py, inserting the same of django, or I should modify something on geoserver, or nothing?<br><br>Best<br><br>E.<br><div><hr>From: <a href="mailto:simone.dalmasso@gmail.com" target="_blank">simone.dalmasso@gmail.com</a><br>Date: Tue, 29 Sep 2015 16:41:15 +0200<br>Subject: Re: [GeoNode-users] post-installation issues<br>To: <a href="mailto:frippe12573@hotmail.com" target="_blank">frippe12573@hotmail.com</a><br>CC: <a href="mailto:geonode-users@lists.osgeo.org" target="_blank">geonode-users@lists.osgeo.org</a><br><br><div dir="ltr">Eugenio to debug you can open a python in your virtualenv with <div>$ python manage.py shell</div><div>then try to import the settings with</div><div>>>> from django.conf import settings</div><div>then see how the MAP_BASELAYERS looks like with</div><div>>>> settings.MAP_BASELAYERS</div><div><br></div><div><br></div><div>for the second question the answer is yes, geoserver shares the same users as geonode although it keeps a default admin password that you change both in the settings and the geoserver users page.</div></div><div><br><div>2015-09-29 16:37 GMT+02:00 Eugenio Trumpy <span dir="ltr"><<a href="mailto:frippe12573@hotmail.com" target="_blank">frippe12573@hotmail.com</a>></span>:<br><blockquote style="border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr">Dear all,<br><br>I completed the installation of geonode <em>vs 2.4.dev20150908094256,<br></em>I even solved the problem on geoserver and it seems to run well.<br>I set a geoserver from my organization as external service and <br>I'm able to see the layers available. I can see the map of the layer <br>and I can use them to prepare maps.<br>I tried also to upload a document, and even this function runs well.<br>My main problem is on map saving, this operation gives me the 500 internal server error.<br>By the way the map appears on the list of maps.<br>Checking the db (postgres) I see in the maps table the new record,<br>however from the map's list I cannot visualize such map, and a new error page<br>with yellow narrow appears. This page contains many statements<em>,</em> these three lines<em><br></em>give an hint on the possible problem:<br><table><tbody><tr><th>Exception Type:</th>
<td>IndexError</td>
</tr>
<tr>
<th>Exception Value:</th>
<td><pre>list index out of range</pre></td>
</tr>
<tr>
<th>Exception Location:</th>
<td>/dati/geonode/geonode/utils.py in viewer_json, line 266</td></tr></tbody></table><br>This is my first issue, I got a suggestion (here in the mailing list) to debug by python<br>console geonode, but unfortunately I don't know how to start.<br>Suggestions?<br><br>Another question, might be related to the previous problem, is on geoserver authentication:<br>I didn't give any password during the installation, and in local_setting.py and setting.py<br>I see that geoserver has the classical administrator credentials (admin,geoserver).<br>However if I use the link to geoserver from the user context menu (in the geonode website)<br>I see the geoserver home page already logged in, but the user logged is not admin,<br>but the superuser of django. Is that right? Have I set th geoserver credential somewhere?<br><br>Thanks for now,<br><br>best regards<span><font color="#888888"><br><br>Eugenio<br> </font></span></div></div>
<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/cgi-bin/mailman/listinfo/geonode-users" rel="noreferrer" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-users</a><br>
<br></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div>Simone </div>
</font></span></div></div> </div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Simone </div>
</div></div></div></div> </div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Simone </div>
</div></div></div></div> </div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Simone </div>
</div>