[GeoNode-users] import SHP

Eugenio Trumpy frippe12573 at hotmail.com
Wed Sep 30 08:14:54 PDT 2015


Hi,

/uploaded/ directory is owned by www-data (same group), and has 755 grants.
I checked inside and I saw the shp file uploaded before.

MEDIA_ROOT in settings.py is:

MEDIA_ROOT = os.path.join(PROJECT_ROOT, "uploaded")

whereas

MEDIA_URL = "uploaded"

Even geonode directory has the same credentials.

E.

> From: pcorti at gmail.com
> Date: Wed, 30 Sep 2015 16:55:25 +0200
> Subject: Re: [GeoNode-users] import SHP
> To: frippe12573 at hotmail.com
> CC: geonode-users at lists.osgeo.org
> 
> On Wed, Sep 30, 2015 at 4:05 PM, Eugenio Trumpy <frippe12573 at hotmail.com> wrote:
> > Hi Paolo,
> >
> > I did what you suggest.
> > The shp file has been uploaded correctly in the geoserver,
> > however I got errors on updatelayers, as follow:
> >
> > $ python manage.py updatelayers
> > 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
> > "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py",
> > line 399, in execute_from_command_line
> >     utility.execute()
> >   File
> > "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py",
> > line 392, in execute
> >     self.fetch_command(subcommand).run_from_argv(self.argv)
> >   File
> > "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py",
> > line 242, in run_from_argv
> >     self.execute(*args, **options.__dict__)
> >   File
> > "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py",
> > line 285, in execute
> >     output = self.handle(*args, **options)
> >   File
> > "/dati/geonode/geonode/geoserver/management/commands/updatelayers.py", line
> > 108, in handle
> >     remove_deleted=remove_deleted)
> >   File "/dati/geonode/geonode/geoserver/helpers.py", line 445, in gs_slurp
> >     "bbox_y1": Decimal(resource.latlon_bbox[3])
> >   File "/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py",
> > line 154, in get_or_create
> >     return self.get_queryset().get_or_create(**kwargs)
> >   File "/usr/local/lib/python2.7/dist-packages/modeltranslation/manager.py",
> > line 341, in get_or_create
> >     return super(MultilingualQuerySet, self).get_or_create(**kwargs)
> >   File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py",
> > line 383, in get_or_create
> >     obj.save(force_insert=True, using=self.db)
> >   File
> > "/usr/local/lib/python2.7/dist-packages/polymorphic/polymorphic_model.py",
> > line 90, in save
> >     return super(PolymorphicModel, self).save(*args, **kwargs)
> >   File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py",
> > line 545, in save
> >     force_update=force_update, update_fields=update_fields)
> >   File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py",
> > line 582, in save_base
> >     update_fields=update_fields, raw=raw, using=using)
> >   File
> > "/usr/local/lib/python2.7/dist-packages/django/dispatch/dispatcher.py", line
> > 185, in send
> >     response = receiver(signal=self, sender=sender, **named)
> >   File "/dati/geonode/geonode/geoserver/signals.py", line 394, in
> > geoserver_post_save
> >     create_thumbnail(instance, thumbnail_remote_url, thumbnail_create_url,
> > ogc_client=http_client)
> >   File "/dati/geonode/geonode/layers/utils.py", line 676, in
> > create_thumbnail
> >     instance.save_thumbnail(filename, image=image)
> >   File "/dati/geonode/geonode/base/models.py", line 564, in save_thumbnail
> >     with open(os.path.join(upload_path, filename), 'wb') as f:
> > Exception: ('Failed to process reg2001_s_wgs84utm33', IOError(13,
> > 'Permission denied'))
> >
> >
> > From the last line, I guess, my problem is on permissions.
> > Mybey something is missing on my config files....
> > Where in particular?
> >
> > E.
> >
> 
> make sure your web server has permission to write to the media
> directory where the thumbnails are generated (set in MEDIA_ROOT in the
> GeoNode settings file)
> p
> 
> -- 
> Paolo Corti
> Geospatial software developer
> web: http://www.paolocorti.net
> twitter: @capooti
> skype: capooti
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20150930/ce7fdf04/attachment-0001.html>


More information about the geonode-users mailing list