[GeoNode-users] error using geonode python manage.py updatelayers

Daniel Victoria daniel.victoria at gmail.com
Tue Mar 6 03:54:41 PST 2018


Maybe your default style for that layer is set to the wrong one. Did you
check what is the default style for that layer in GeoServer?

On Tue, Mar 6, 2018 at 2:54 AM Franklin, Chris - Perth. <
CFranklin at rml.com.au> wrote:

> Hi,
>
>
>
> Im running Geonode 2.4 on windows 2012 r2, I now get this error message
> when running the python manage.py updatelayers
>
>
>
>
>
> (geonode-2.4.x) C:\GeoNode-2.4.x\geonode-2.4.x>python manage.py
> updatelayers
>
> [updated] Layer Basemaps_Bibiani_50cm_z30n_UTM_WGS84_CIR-2018-02-23.ERS
> (1/46)
>
> [updated] Layer Basemaps_Bibiani_50cm_z30n_UTM_WGS84_RGB-2018-02-23.ERS
> (2/46)
>
> [updated] Layer RAV_ENV_locations (3/46)
>
> [updated] Layer a__1290linesNEW (4/46)
>
> [updated] Layer Boscut_Area_Plan (5/46)
>
> Stopping process because --ignore-errors was not set and an error was
> found.
>
> Traceback (most recent call last):
>
>   File "manage.py", line 28, in <module>
>
>     execute_from_command_line(sys.argv)
>
>   File
> "C:\GeoNode-2.4.x\geonode-2.4.x\lib\site-packages\django\core\management\
>
> __init__.py", line 399, in execute_from_command_line
>
>     utility.execute()
>
>   File
> "C:\GeoNode-2.4.x\geonode-2.4.x\lib\site-packages\django\core\management\
>
> __init__.py", line 392, in execute
>
>     self.fetch_command(subcommand).run_from_argv(self.argv)
>
>   File
> "C:\GeoNode-2.4.x\geonode-2.4.x\lib\site-packages\django\core\management\
>
> base.py", line 242, in run_from_argv
>
>     self.execute(*args, **options.__dict__)
>
>   File
> "C:\GeoNode-2.4.x\geonode-2.4.x\lib\site-packages\django\core\management\
>
> base.py", line 285, in execute
>
>     output = self.handle(*args, **options)
>
>   File
> "C:\GeoNode-2.4.x\geonode-2.4.x\geonode\geoserver\management\commands\upd
>
> atelayers.py", line 108, in handle
>
>     remove_deleted=remove_deleted)
>
>   File "C:\GeoNode-2.4.x\geonode-2.4.x\geonode\geoserver\helpers.py", line
> 458,
>
> in gs_slurp
>
>     "bbox_y1": Decimal(resource.latlon_bbox[3])
>
>   File
> "C:\GeoNode-2.4.x\geonode-2.4.x\lib\site-packages\django\db\models\manage
>
> r.py", line 154, in get_or_create
>
>     return self.get_queryset().get_or_create(**kwargs)
>
>   File
> "C:\GeoNode-2.4.x\geonode-2.4.x\lib\site-packages\modeltranslation\manage
>
> r.py", line 341, in get_or_create
>
>     return super(MultilingualQuerySet, self).get_or_create(**kwargs)
>
>   File
> "C:\GeoNode-2.4.x\geonode-2.4.x\lib\site-packages\django\db\models\query.
>
> py", line 383, in get_or_create
>
>     obj.save(force_insert=True, using=self.db)
>
>   File
> "C:\GeoNode-2.4.x\geonode-2.4.x\lib\site-packages\polymorphic\polymorphic
>
> _model.py", line 90, in save
>
>     return super(PolymorphicModel, self).save(*args, **kwargs)
>
>   File
> "C:\GeoNode-2.4.x\geonode-2.4.x\lib\site-packages\django\db\models\base.p
>
> y", line 545, in save
>
>     force_update=force_update, update_fields=update_fields)
>
>   File
> "C:\GeoNode-2.4.x\geonode-2.4.x\lib\site-packages\django\db\models\base.p
>
> y", line 582, in save_base
>
>     update_fields=update_fields, raw=raw, using=using)
>
>   File
> "C:\GeoNode-2.4.x\geonode-2.4.x\lib\site-packages\django\dispatch\dispatc
>
> her.py", line 185, in send
>
>     response = receiver(signal=self, sender=sender, **named)
>
>   File "C:\GeoNode-2.4.x\geonode-2.4.x\geonode\geoserver\signals.py", line
> 470,
>
> in geoserver_post_save
>
>     set_styles(instance, gs_catalog)
>
>   File "C:\GeoNode-2.4.x\geonode-2.4.x\geonode\geoserver\helpers.py", line
> 776,
>
> in set_styles
>
>     default_style = gs_layer.default_style
>
> Exception: ('Failed to process boxcut_des201802_3d_decline_line',
> AttributeError
>
> ("'NoneType' object has no attribute 'default_style'",))
>
>
>
> (geonode-2.4.x) C:\GeoNode-2.4.x\geonode-2.4.x>
>
>
>
> I don’t have a style called boxcut_des201802_3d_decline_line, but do have
> called boxcut_des201802_3d_decline_polyline, which I use on that layer, the
> layer work fine, but I can’t run the python manage.py updatelayers
>
>
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> <StyledLayerDescriptor version="1.0.0"
>
>   xsi:schemaLocation="http://www.opengis.net/sld
> http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd"
>
>   xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc
> "
>
>   xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance">
>
>
>
>   <NamedLayer>
>
>     <Name>boxcut_des201802_3d_decline_polyline</Name>
>
>     <UserStyle>
>
>       <Title>A violet line style</Title>
>
>       <FeatureTypeStyle>
>
>         <Rule>
>
>           <Title>violet line</Title>
>
>           <LineSymbolizer>
>
>             <Stroke>
>
>               <CssParameter name="stroke">#FF0000</CssParameter>
>
>             </Stroke>
>
>           </LineSymbolizer>
>
>         </Rule>
>
>
>
>       </FeatureTypeStyle>
>
>     </UserStyle>
>
>   </NamedLayer>
>
> </StyledLayerDescriptor>
>
> Can someone point me in the right direction?
> _______________________________________________
> geonode-users mailing list
> geonode-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/geonode-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20180306/ff6c344b/attachment-0001.html>


More information about the geonode-users mailing list