[GeoNode-users] error executing python manage.py updatelayers

Vianello Andrea Andrea.Vianello at eurac.edu
Wed Aug 3 03:24:13 PDT 2016


Thank you very much Amedeo and Simone.
“geonode” command works and it’s what I need.

But I get an error when I try “geonode updatelayers”, the response is:
Not enabling BingMaps base layer as a BING_API_KEY is not defined in local_settings.py file.
Traceback (most recent call last):
  File "/usr/bin/django-admin.py", line 5, in <module>
    management.execute_from_command_line()
  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "/usr/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/lib/python2.7/dist-packages/django/core/management/base.py", line 242, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 285, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.7/dist-packages/geonode/geoserver/management/commands/updatelayers.py", line 108, in handle
    remove_deleted=remove_deleted)
  File "/usr/local/lib/python2.7/dist-packages/geonode/geoserver/helpers.py", line 395, in gs_slurp
    resources = cat.get_resources()
  File "/usr/lib/python2.7/dist-packages/geoserver/catalog.py", line 724, in get_resources
    resources.extend(self.get_resources(workspace=ws))
  File "/usr/lib/python2.7/dist-packages/geoserver/catalog.py", line 720, in get_resources
    resources.extend(self.get_resources(store))
  File "/usr/lib/python2.7/dist-packages/geoserver/catalog.py", line 716, in get_resources
    return store.get_resources()
  File "/usr/lib/python2.7/dist-packages/geoserver/store.py", line 207, in get_resources
    xml = self.catalog.get_xml(res_url)
  File "/usr/lib/python2.7/dist-packages/geoserver/catalog.py", line 216, in get_xml
    raise FailedRequestError("Tried to make a GET request to %s but got a %d status code: \n%s" % (rest_url, response.status, content))
geoserver.catalog.FailedRequestError: Tried to make a GET request to http://localhost/geoserver/rest/workspaces/geonode/wmsstores/Sentinel Alpine Observatory/wmslayers.xml but got a 404 status code:
No such wms store: geonode,Sentinel



What may be the reason?
If I try a geonode importlayers it works properly but without results because of updatelayers failure (I think).

Thank you,
Andrea.

--

Andrea Vianello

EURAC research
Institute for Applied Remote Sensing
Viale Druso 1, I-39100 Bolzano, Italy
t  +39 0471 055 270

andrea.vianello at eurac.edu<mailto:andrea.vianello at eurac.edu>
www.eurac.edu<http://www.eurac.edu/>

This transmission is intended only for the use of the addressee and may contain confidential or legally privileged information.
If you receive this transmission by error, please notify the author immediately by mail and delete all copies of this transmission and any attachments.
Any use or dissemination of this communication is strictly prohibited by the "Privacy-Code", D.Lgs. 196/2003 and may lead to penal prosecution and liability for damages.
P Think before you print

From: Simone Dalmasso [mailto:simone.dalmasso at gmail.com]
Sent: Tuesday, August 2, 2016 10:19 AM
To: Amedeo Fadini <amefad at gmail.com>
Cc: Vianello Andrea <Andrea.Vianello at eurac.edu>; geonode-users at lists.osgeo.org
Subject: Re: [GeoNode-users] error executing python manage.py updatelayers

Hi, just to add a note to the Amedeo's right answer, the Python manage is a command available for Geonode installed in Dev mode, while by default the Ubuntu package installs the command geonode available in any shell.

Il martedì 2 agosto 2016, Amedeo Fadini <amefad at gmail.com<mailto:amefad at gmail.com>> ha scritto:
Hello Andrea,

2016-08-01 12:22 GMT+02:00 Vianello Andrea <Andrea.Vianello at eurac.edu<javascript:;>>:
> Hi,
>
[...]
> In the geonode home there is no the file manage.py so I Tried to use the one
> in
> “/usr/lib/python2.7/dist-packages/django/conf/project_template/manage.py”,
> is it correct?

The command goenode updatelayers is an alias for django-admin, not manage.py

the content of /usr/sbin/geonode in my installation (also ubuntu 14.04
with ppa) is this:

#!/bin/bash
if hash django-admin 2>/dev/null; then
    django-admin $@ --settings=geonode.settings
else
    django-admin.py $@ --settings=geonode.settings
fi

maybe you could try to create it  and make executable, or test the command

The error "Could not import settings '{{ project_name }}.settings'"
says that you didn't specify any project settings.

Amedeo
_______________________________________________
geonode-users mailing list
geonode-users at lists.osgeo.org<javascript:;>
http://lists.osgeo.org/mailman/listinfo/geonode-users


--
Simone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20160803/13e4c592/attachment-0001.html>


More information about the geonode-users mailing list