<div dir="ltr"><div>Hi Julierme,</div><div><br></div>I had the problem you described before. The reason you are getting this is because the env variables are not set properly. Run this command before running any other commands:<div><br></div><div><font color="#ff0000">mkdir -p /usr/src/app/; \<br>  source $HOME/.override_env; \<br> echo DATABASE_URL=$DATABASE_URL; \<br>    echo GEODATABASE_URL=$GEODATABASE_URL; \<br>      echo SITEURL=$SITEURL; \<br>      echo ALLOWED_HOSTS=$ALLOWED_HOSTS; \<br>  echo GEOSERVER_PUBLIC_LOCATION=$GEOSERVER_PUBLIC_LOCATION;</font><br><div><br></div><div>You should be able to run the commands then.</div><div><br></div><div>I<br><div><br></div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 17, 2019 at 10:19 AM 1520 gis <<a href="mailto:juliermeopensourcedeveloper@gmail.com">juliermeopensourcedeveloper@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi Ran,</div><div><br></div><div>Thank you very much for your reply. Yes, I just installed a brand new version of GeoNode-Project@2.8 and updatelayers did not work. See the response in [1]. I then ran <br><pre><code>python manage.py makemigrations
python manage.py migrate
</code></pre></div><div>However, the problem remains. I am now asked for a superuser [2]. I did create a superuser for GeoNode-Project in a CenTOS7, but did not solve the problem. The issue also happens in GeoNode-Project@2.10.</div><div>Any help would be appreciated.</div><div><br></div><div>Kind regards</div><div><br></div><div>Julierme<br></div><div><br></div><div>[1]</div><div>root@2ff53eacb7e9:/usr/src/my_geonode# python manage.py updatelayers -s metoc -f previsao_meteorologica_aml<br>JSONField implementation is: <class 'jsonfield.fields.JSONField'><br>Traceback (most recent call last):<br>  File "manage.py", line 31, in <module><br>    execute_from_command_line(sys.argv)<br>  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line<br>    utility.execute()<br>  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 346, in execute<br>    self.fetch_command(subcommand).run_from_argv(self.argv)<br>  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 394, in run_from_argv<br>    self.execute(*args, **cmd_options)<br>  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 445, in execute<br>    output = self.handle(*args, **options)<br>  File "/usr/src/geonode/geonode/geoserver/management/commands/updatelayers.py", line 98, in handle<br>    owner = get_valid_user(user)<br>  File "/usr/src/geonode/geonode/people/utils.py", line 44, in get_valid_user<br>    theuser = get_default_user()<br>  File "/usr/src/geonode/geonode/people/utils.py", line 31, in get_default_user<br>    if superusers.count() > 0:<br>  File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 318, in count<br>    return self.query.get_count(using=self.db)<br>  File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/query.py", line 466, in get_count<br>    number = obj.get_aggregation(using, ['__count'])['__count']<br>  File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/query.py", line 447, in get_aggregation<br>    result = compiler.execute_sql(SINGLE)<br>  File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 840, in execute_sql<br>    cursor.execute(sql, params)<br>  File "/usr/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 79, in execute<br>    return super(CursorDebugWrapper, self).execute(sql, params)<br>  File "/usr/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute<br>    return self.cursor.execute(sql, params)<br>  File "/usr/local/lib/python2.7/site-packages/django/db/utils.py", line 98, in __exit__<br>    six.reraise(dj_exc_type, dj_exc_value, traceback)<br>  File "/usr/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute<br>    return self.cursor.execute(sql, params)<br>  File "/usr/local/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py", line 318, in execute<br>    return Database.Cursor.execute(self, query, params)<br>django.db.utils.OperationalError: no such table: people_profile<br></div><div><br></div><div>[2]</div><div>root@2ff53eacb7e9:/usr/src/my_geonode# python manage.py updatelayers -f previsao_meteorologica_aml<br>JSONField implementation is: <class 'jsonfield.fields.JSONField'><br>Traceback (most recent call last):<br>  File "manage.py", line 31, in <module><br>    execute_from_command_line(sys.argv)<br>  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line<br>    utility.execute()<br>  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 346, in execute<br>    self.fetch_command(subcommand).run_from_argv(self.argv)<br>  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 394, in run_from_argv<br>    self.execute(*args, **cmd_options)<br>  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 445, in execute<br>    output = self.handle(*args, **options)<br>  File "/usr/src/geonode/geonode/geoserver/management/commands/updatelayers.py", line 98, in handle<br>    owner = get_valid_user(user)<br>  File "/usr/src/geonode/geonode/people/utils.py", line 44, in get_valid_user<br>    theuser = get_default_user()<br>  File "/usr/src/geonode/geonode/people/utils.py", line 35, in get_default_user<br>    raise GeoNodeException('You must have an admin account configured '<br>geonode.GeoNodeException: You must have an admin account configured before importing data. Try: django-admin.py createsuperuser<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 17, 2019 at 2:06 PM Ran L. <<a href="mailto:kula009@gmail.com" target="_blank">kula009@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello Julierme,<div><br></div><div>I also had issues with the geonode "updatelayers" command yesterday, and might have found a possible solution for it:</div><div><br></div><div>I'm also using geonode-project with docker on a Ubuntu machine. I couldn't run the command successfully after building the service. You can see the details here: <a href="https://github.com/GeoNode/geonode/issues/4650" target="_blank">https://github.com/GeoNode/geonode/issues/4650</a></div><div><br></div><div><b>A fix: </b>I took my own customized files (templates, python files, statics, etc.) and dump them into a newly created geonode-project. The command worked after that.</div><div><br></div><div>My speculation is that the geonode-project files I had were not compatible with the current geonode, since I haven't updated them for a long while. </div><div><br></div><div>Hope this provides some insights.</div><div><br></div><div>Thanks!</div><div><br></div><div>Ran</div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 17, 2019 at 9:47 AM 1520 gis <<a href="mailto:juliermeopensourcedeveloper@gmail.com" target="_blank">juliermeopensourcedeveloper@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Dear users and developers,</div><div><br></div><div>I am not sure if it is on the scope of future work, but I have already started a tutorial to install GeoNode-Project via Docker on a CentOS7 server. I got it installed, but not sure that I got all required geonode packages on a CenTOS7. Also, I had an issue while using python manage.py updatelayers.</div><div><br></div><div>I am making myself a volunteer to help on this theme. I would like to share the command lines and have someones' contribution to improve what I got so far.</div><div><br></div><div>Kind regards,</div><div><br></div><div>Julierme<br></div><div><br></div><div><br></div></div>
_______________________________________________<br>
geonode-users mailing list<br>
<a href="mailto:geonode-users@lists.osgeo.org" target="_blank">geonode-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/geonode-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/geonode-users</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>