[GeoNode-users] Updatelayers failed
Jose Cáceres
jose.atyus at gmail.com
Fri Feb 7 11:42:09 PST 2020
Hi everyone,
Hope everything is well.
I'm running geonode 2.10 using docker instance as per this instructions:
http://docs.geonode.org/en/2.10.x/install/core/#docker
I'm running it on a local IP, not localhost directly, but I thought
everything went well with the installation since I could load the page,
load geoserver, uploading a layer using the upload function form the site,
I could dump me own database into geonode_data and I could see my layers in
geoserver, all as shown in the screenshots attached.
However, when I try to import my data to geonode from geoserver, using the
updatelayers command I get the following error message.
So I enter the container running:
docker exec -it geoserver4geonode /bin/bash
The I ran:
python manage.py makemigrations
python manage.py migrate
python manage.py migrate --run-syncdb
Everything went without any issues. Then I tried:
DJANGO_SETTINGS_MODULE=geonode.settings python manage.py updatelayers -w
geonode --skip-geonode-registered
And got the following error:
Traceback (most recent call last):
File "manage.py", line 29, in <module>
execute_from_command_line(sys.argv)
File
"/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py",
line 381, in execute_from_command_line
utility.execute()
File
"/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py",
line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File
"/usr/local/lib/python3.7/site-packages/django/core/management/base.py",
line 323, in run_from_argv
self.execute(*args, **cmd_options)
File
"/usr/local/lib/python3.7/site-packages/django/core/management/base.py",
line 364, in execute
output = self.handle(*args, **options)
File
"/usr/src/app/geonode/geoserver/management/commands/updatelayers.py", line
98, in handle
owner = get_valid_user(user)
File "/usr/src/app/geonode/people/utils.py", line 46, in get_valid_user
theuser = get_default_user()
File "/usr/src/app/geonode/people/utils.py", line 37, in get_default_user
raise GeoNodeException('You must have an admin account configured '
geonode.GeoNodeException: You must have an admin account configured before
importing data. Try: django-admin.py createsuperuser
Then I tried passing the flag user to the previous command, like this:
DJANGO_SETTINGS_MODULE=geonode.settings python manage.py updatelayers -u
admin -w geonode --skip-geonode-registered
Traceback (most recent call last):
File "manage.py", line 29, in <module>
execute_from_command_line(sys.argv)
File
"/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py",
line 381, in execute_from_command_line
utility.execute()
File
"/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py",
line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File
"/usr/local/lib/python3.7/site-packages/django/core/management/base.py",
line 323, in run_from_argv
self.execute(*args, **cmd_options)
File
"/usr/local/lib/python3.7/site-packages/django/core/management/base.py",
line 364, in execute
output = self.handle(*args, **options)
File
"/usr/src/app/geonode/geoserver/management/commands/updatelayers.py", line
98, in handle
owner = get_valid_user(user)
File "/usr/src/app/geonode/people/utils.py", line 48, in get_valid_user
theuser = get_user_model().objects.get(username=user)
File
"/usr/local/lib/python3.7/site-packages/django/db/models/manager.py", line
82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/django/db/models/query.py",
line 408, in get
self.model._meta.object_name
geonode.people.models.DoesNotExist: Profile matching query does not exist.
No luck either, I can log to the site using the default credentials, but I
haven't created any other users, is that necesary in order to use the
updatelayers?
Thanks in advance for all your help!
José
--
José David Cáceres
Ingeniero Ambiental
Máster en Tecnologías de la Información Geográfica
e-mail: jose.atyus at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20200207/d485f91f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exhibit_a.jpg
Type: image/jpeg
Size: 233861 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20200207/d485f91f/attachment-0003.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exhibit_c.jpg
Type: image/jpeg
Size: 176211 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20200207/d485f91f/attachment-0004.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exhibit_b.jpg
Type: image/jpeg
Size: 417805 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20200207/d485f91f/attachment-0005.jpg>
More information about the geonode-users
mailing list