David, I experienced that error today after a layer failed to upload because of other reason (missing projection).
First time it complains about projection, second time it complains about the style. In my cease I just reset geoserver and the django db and did it again. I am confident this missing projection use case will help make it reproducible. Ariel. On Thu, Aug 18, 2011 at 10:04 PM, David Winslow <[email protected]> wrote: > This is not so good - as you can see GeoServer and GeoNode do not handle > well the case where a layer does not have a default style. GeoServer is > supposed to ensure that this situation never arises in normal use, and > GeoNode (via gsconfig) should never try to unset the default style anyway. > > Was there anything unusual about the layer that was missing the default > style? Do you mind sharing that dataset so I can try it myself? > > -- > David Winslow > OpenGeo - http://opengeo.org/ > > On Thu, Aug 18, 2011 at 10:58 AM, simone balbo <[email protected]> wrote: >> >> David, >> >> this command is great! It allows to save a lot of time and repetitive >> upload work! >> >> Thanks! >> >> During the upload I experienced the following error: >> >> No handlers could be found for logger "geonode.maps.utils" >> Traceback (most recent call last): >> File "manage.py", line 14, in <module> >> execute_manager(settings) >> File >> "/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/core/management/__init__.py", >> line 438, in execute_manager >> utility.execute() >> File >> "/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/core/management/__init__.py", >> line 379, in execute >> self.fetch_command(subcommand).run_from_argv(self.argv) >> File >> "/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/core/management/base.py", >> line 191, in run_from_argv >> self.execute(*args, **options.__dict__) >> File >> "/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/core/management/base.py", >> line 218, in execute >> output = self.handle(*args, **options) >> File >> "/var/www/geonode/wsgi/geonode/src/GeoNodePy/geonode/maps/management/commands/geonode_import.py", >> line 27, in handle >> upload(path, opts['user'], opts['overwrite'], >> opts['keywords'].split()) >> File >> "/var/www/geonode/wsgi/geonode/src/GeoNodePy/geonode/maps/utils.py", line >> 541, in upload >> keywords=keywords >> File >> "/var/www/geonode/wsgi/geonode/src/GeoNodePy/geonode/maps/utils.py", line >> 503, in file_upload >> new_layer = save(layer, filename, theuser, overwrite, >> keywords=keywords) >> File >> "/var/www/geonode/wsgi/geonode/src/GeoNodePy/geonode/maps/utils.py", line >> 337, in save >> sld = get_sld_for(publishing) >> File >> "/var/www/geonode/wsgi/geonode/src/GeoNodePy/geonode/maps/gs_helpers.py", >> line 101, in get_sld_for >> name = layer.default_style.name if layer.default_style is not None >> else "point" >> File >> "/var/www/geonode/wsgi/geonode/src/gsconfig.py/src/geoserver/layer.py", line >> 77, in _get_default_style >> name = self.dom.find("defaultStyle/name").text >> AttributeError: 'NoneType' object has no attribute 'text' >> >> Basically the procedure didn't create the default SLD for one of the >> layers. This caused all the links http://localhost/data/# to be broken. >> I manually created the SLD for that layer on geoserver and after that all >> works good! >> >> I experienced this error in the past also during normal upload process, is >> this happening only to me? >> >> Many thanks >> >> Simone >> >> >> On 17 August 2011 18:03, David Winslow <[email protected]> wrote: >>> >>> There was a coding error in the implementation of that command. I guess >>> you are the first to try using it since it was developed, congratulations :P >>> >>> I have corrected the issue in the source repository, you can build from a >>> recent checkout to get the fix, or just edit the appropriate file by hand if >>> you need to apply the fix in an existing installation. >>> >>> Here's the change that needs to be made: >>> https://github.com/GeoNode/geonode/commit/445fddd226c907e59e1f87da70b679690377501b >>> >>> -- >>> David Winslow >>> OpenGeo - http://opengeo.org/ >>> >>> On Wed, Aug 17, 2011 at 3:00 PM, simone balbo <[email protected]> >>> wrote: >>>> >>>> Hello, >>>> >>>> I'm trying to perform a data batch import to GeoNode with the django >>>> command "geonode_import". >>>> I execute this command with virtual environment activated: python >>>> manage.py geonode_import <data_path> >>>> and I keep getting this error: >>>> >>>> Traceback (most recent call last): >>>> File "manage.py", line 14, in <module> >>>> execute_manager(settings) >>>> File >>>> "/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/core/management/__init__.py", >>>> line 438, in execute_manager >>>> utility.execute() >>>> File >>>> "/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/core/management/__init__.py", >>>> line 379, in execute >>>> self.fetch_command(subcommand).run_from_argv(self.argv) >>>> File >>>> "/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/core/management/base.py", >>>> line 191, in run_from_argv >>>> self.execute(*args, **options.__dict__) >>>> File >>>> "/var/www/geonode/wsgi/geonode/lib/python2.6/site-packages/django/core/management/base.py", >>>> line 218, in execute >>>> output = self.handle(*args, **options) >>>> File >>>> "/var/www/geonode/wsgi/geonode/src/GeoNodePy/geonode/maps/management/commands/geonode_import.py", >>>> line 26, in handle >>>> upload(path, opts['user'], opts['overwrite'], >>>> opts['keywords'].split()) >>>> NameError: global name 'upload' is not defined >>>> >>>> Is this the correct way to use this command? Can you explain what I'm >>>> doing wrong? >>>> >>>> Thanks >>>> >>>> Simone >>> >> > >
