[GeoNode-users] GeoNode-Project: migration and createsuperuser (Julierme Pinheiro)

Julierme Pinheiro juliermeopensourcedeveloper at gmail.com
Thu Aug 2 06:45:18 PDT 2018


Hi Francesco and Toni,

I got (sipam_geonode) geo at gis: /home/sipam_geonode/my_geonode working.
Awesome!!!!!!!

I added pygdal==2.2.1.3 to requirements.txt

Yep. (;

Thank you very very much for your help. And sorry for the long previous
e-mail.


I appreciated it

Kind regards

Julierme




On Thu, Aug 2, 2018 at 10:22 AM, Julierme Pinheiro <
juliermeopensourcedeveloper at gmail.com> wrote:

> Dear Francesco,
>
> Thank you very much for your reply and resource suggestion. I am taking a
> python course and as soon as I finished it, I will devour the information
> in http://www.paolocorti.net/foss4g_2017_geonode_solr/.
> <http://www.paolocorti.net/foss4g_2017_geonode_solr/>
>
> Regarding Gdalinfo, I have gdal at 2.2.1 and pygdal at 2.2.1.3
>
> geo at gis:~$ gdal-config --version
> 2.2.1
> geo at gis:~$ gdal-config --version
> 2.2.1
> geo at gis:~$ pip show pygdal
> Name: pygdal
> Version: 2.2.1.3
>
> Before entering to the resource you sent me, let me just give some more
> information about what I am trying to do. I created three virtualenv for
> GeoNode-Project named by: my_geonode, geonode_project, and sipam_geonode.
> Sorry if I am misunderstanding, but I think I can do that without mixing
> the requirements  (requirements.txt) for each GeoNode vesrion. Also I
> created three users /home/my_geonode; /home/geonode_project and
> /home/sipam_geonode.
>
> (my_geonode) geo at gis: /home/my_geonode/my_geonode  # contains
> GeoNode-Project at 2.8.0. installed according to the pdf in attached.
>
> Fine. GeoNode is up and running.
>
> One issue only: I collected the static directory by running python
> manage.py collectstatic, but I did not see css changes on the index.html.
>
> site_base.css ---> .home .jumbotron { background: yellow }
>
> (geonode_project) geo at gis: /home/geonode_project/my_geonode  # contains
> GeoNode-Project at 2.9.0. installed according to https://github.com/
> geosolutions-it/geonode-project
>
> Issue1: paver sync
>
>
> Response:
>
>  pavement.sync
>  python -W ignore manage.py makemigrations --noinput
> Traceback (most recent call last):
>   File "manage.py", line 31, in <module>
>     execute_from_command_line(sys.argv)
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/django/core/management/__init__.py", line 364, in
> execute_from_command_line
>     utility.execute()
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/django/core/management/__init__.py", line 356, in execute
>     self.fetch_command(subcommand).run_from_argv(self.argv)
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/django/core/management/base.py", line 283, in run_from_argv
>     self.execute(*args, **cmd_options)
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/django/core/management/base.py", line 327, in execute
>     self.check()
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/django/core/management/base.py", line 359, in check
>     include_deployment_checks=include_deployment_checks,
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/django/core/management/base.py", line 346, in _run_checks
>     return checks.run_checks(**kwargs)
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/django/core/checks/registry.py", line 81, in run_checks
>     new_errors = check(app_configs=app_configs)
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/django/core/checks/urls.py", line 16, in check_url_config
>     return check_resolver(resolver)
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/django/core/checks/urls.py", line 26, in check_resolver
>     return check_method()
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/django/urls/resolvers.py", line 254, in check
>     for pattern in self.url_patterns:
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/django/utils/functional.py", line 35, in __get__
>     res = instance.__dict__[self.name] = self.func(instance)
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/django/urls/resolvers.py", line 405, in url_patterns
>     patterns = getattr(self.urlconf_module, "urlpatterns",
> self.urlconf_module)
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/django/utils/functional.py", line 35, in __get__
>     res = instance.__dict__[self.name] = self.func(instance)
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/django/urls/resolvers.py", line 398, in urlconf_module
>     return import_module(self.urlconf_name)
>   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in
> import_module
>     __import__(name)
>   File "/home/geonode_project/my_geonode/my_geonode/urls.py", line 24, in
> <module>
>     from geonode.urls import urlpatterns
>   File "/home/geo/Envs/geonode_project/src/geonode/geonode/urls.py", line
> 89, in <module>
>     url(r'^catalogue/', include('geonode.catalogue.urls')),
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/django/conf/urls/__init__.py", line 50, in include
>     urlconf_module = import_module(urlconf_module)
>   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in
> import_module
>     __import__(name)
>   File "/home/geo/Envs/geonode_project/src/geonode/geonode/catalogue/urls.py",
> line 22, in <module>
>     from . import views
>   File "/home/geo/Envs/geonode_project/src/geonode/geonode/catalogue/views.py",
> line 29, in <module>
>     from pycsw import server
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/pycsw/__init__.py", line 35, in <module>
>     __version__ = pkg_resources.require("pycsw")[0].version
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/pkg_resources/__init__.py", line 892, in require
>     needed = self.resolve(parse_requirements(requirements))
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/pkg_resources/__init__.py", line 783, in resolve
>     raise VersionConflict(dist, req).with_context(dependent_req)
> pkg_resources.ContextualVersionConflict: (xmltodict 0.9.2
> (/home/geo/Envs/geonode_project/lib/python2.7/site-packages),
> Requirement.parse('xmltodict==0.10.2'), set(['pycsw']))
>
>
> Captured Task Output:
> ---------------------
>
> ---> pavement.sync
>  python -W ignore manage.py makemigrations --noinput
>
> Build failed running pavement.sync: Subprocess return code: 1
>
>
> Issue2: paver start
>
> *Note*: The issue seems to be related to xmltodict version. It is
> installed xmltodict 0.9.2, but it requires xmltodict 0.10.2. My concern is
> to try to upgrade the requirements version and get everything messed up.
>
> (geonode_project) geo at gis:/home/geonode_project/my_geonode$ pip show
> xmltodict
> Name: xmltodict
> Version: 0.9.2
>
>
>
> Traceback (most recent call last):
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/django/utils/autoreload.py", line 228, in wrapper
>     fn(*args, **kwargs)
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/django/core/management/commands/runserver.py", line 124, in
> inner_run
>     self.check(display_num_errors=True)
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/django/core/management/base.py", line 359, in check
>     include_deployment_checks=include_deployment_checks,
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/django/core/management/base.py", line 346, in _run_checks
>     return checks.run_checks(**kwargs)
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/django/core/checks/registry.py", line 81, in run_checks
>     new_errors = check(app_configs=app_configs)
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/django/core/checks/urls.py", line 16, in check_url_config
>     return check_resolver(resolver)
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/django/core/checks/urls.py", line 26, in check_resolver
>     return check_method()
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/django/urls/resolvers.py", line 254, in check
>     for pattern in self.url_patterns:
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/django/utils/functional.py", line 35, in __get__
>     res = instance.__dict__[self.name] = self.func(instance)
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/django/urls/resolvers.py", line 405, in url_patterns
>     patterns = getattr(self.urlconf_module, "urlpatterns",
> self.urlconf_module)
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/django/utils/functional.py", line 35, in __get__
>     res = instance.__dict__[self.name] = self.func(instance)
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/django/urls/resolvers.py", line 398, in urlconf_module
>     return import_module(self.urlconf_name)
>   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in
> import_module
>     __import__(name)
>   File "/home/geonode_project/my_geonode/my_geonode/urls.py", line 24, in
> <module>
>     from geonode.urls import urlpatterns
>   File "/home/geo/Envs/geonode_project/src/geonode/geonode/urls.py", line
> 89, in <module>
>     url(r'^catalogue/', include('geonode.catalogue.urls')),
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/django/conf/urls/__init__.py", line 50, in include
>     urlconf_module = import_module(urlconf_module)
>   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in
> import_module
>     __import__(name)
>   File "/home/geo/Envs/geonode_project/src/geonode/geonode/catalogue/urls.py",
> line 22, in <module>
>     from . import views
>   File "/home/geo/Envs/geonode_project/src/geonode/geonode/catalogue/views.py",
> line 29, in <module>
>     from pycsw import server
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/pycsw/__init__.py", line 35, in <module>
>     __version__ = pkg_resources.require("pycsw")[0].version
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/pkg_resources/__init__.py", line 892, in require
>     needed = self.resolve(parse_requirements(requirements))
>   File "/home/geo/Envs/geonode_project/local/lib/python2.7/
> site-packages/pkg_resources/__init__.py", line 783, in resolve
>     raise VersionConflict(dist, req).with_context(dependent_req)
> pkg_resources.ContextualVersionConflict: (xmltodict 0.9.2
> (/home/geo/Envs/geonode_project/lib/python2.7/site-packages),
> Requirement.parse('xmltodict==0.10.2'), set(['pycsw']))
> GeoNode is now available.
>
>
> (sipam_geonode) geo at gis: /home/sipam_geonode/my_geonode  # contains
> GeoNode-Project at 2.6.x. installed according to http://geonode.org/dev-
> workshop/#/2/3
>
> Issues: python manage.py migrate
>            python manage.py createsuperuser
>            python manage.py shell
>
> Response:
>
> Traceback (most recent call last):
>   File "manage.py", line 29, in <module>
>     execute_from_command_line(sys.argv)
>   File "/home/geo/Envs/sipam_geonode/local/lib/python2.7/site-
> packages/django/core/management/__init__.py", line 354, in
> execute_from_command_line
>     utility.execute()
>   File "/home/geo/Envs/sipam_geonode/local/lib/python2.7/site-
> packages/django/core/management/__init__.py", line 328, in execute
>     django.setup()
>   File "/home/geo/Envs/sipam_geonode/local/lib/python2.7/site-packages/django/__init__.py",
> line 18, in setup
>     apps.populate(settings.INSTALLED_APPS)
>   File "/home/geo/Envs/sipam_geonode/local/lib/python2.7/site-
> packages/django/apps/registry.py", line 108, in populate
>     app_config.import_models(all_models)
>   File "/home/geo/Envs/sipam_geonode/local/lib/python2.7/site-
> packages/django/apps/config.py", line 198, in import_models
>     self.models_module = import_module(models_module_name)
>   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in
> import_module
>     __import__(name)
>   File "/home/sipam_geonode/geonode/geonode/base/models.py", line 56, in
> <module>
>     from geonode.utils import bbox_to_wkt
>   File "/home/sipam_geonode/geonode/geonode/utils.py", line 30, in
> <module>
>     from osgeo import ogr
> ImportError: No module named osgeo
>
>
> What I am doing seems to be crazy (;. But I separated my project in two
> parts, in one side I have GeoNode Production working fine and on the other,
> I need to have GeoNode-project. My goal is to have geonode-project working
> fine and make the connection between them. A bridge project started from
> its land edges (;
>
> Kind regards
>
> Julierme
>
>
>
>
>
>
>
>
>
>
> On Thu, Aug 2, 2018 at 7:51 AM, francesco bartoli <xbartolone at gmail.com>
> wrote:
>
>> Hi Julierme,
>>
>> just to give you some quick ways to check what could be wrong.
>>
>> Check what GDAL version is installed or it isn't
>> -----------------------------------------------------
>> $ gdalinfo --version
>>
>> Check if the python bindings for GDAL are installed
>> --------------------------------------------------------------------
>> (virtual environment)
>> $ python manage.py shell
>>
>> (geonode installed systemwide)
>> $ geonode shell
>>
>> then in the interactive python shell
>>
>> >>>from osgeo import ogr
>>
>> Remember to make sure to match the GDAL binary version when you install
>> the python bindings pygdal as already suggested by Toni.
>>
>> A great resource to improve your confidence to programming GeoNode with
>> the interactive shell is the workshop from Paolo Corti:
>>
>> http://www.paolocorti.net/foss4g_2017_geonode_solr/
>>
>>
>> Il giorno gio 2 ago 2018 alle ore 12:27 Julierme Pinheiro <
>> juliermeopensourcedeveloper at gmail.com> ha scritto:
>>
>>> Hi Toni,
>>>
>>> Thank you very much for your reply. The problem remains even after your
>>> suggested command lines. I will separate a brand new Ubuntu at 16.04LTS
>>> machine and see what happens.
>>>
>>> I appreciated your time and help.
>>>
>>> Kind regards
>>>
>>> Julierme
>>>
>>> 2018-08-02 6:07 GMT-03:00 Toni Schönbuchner <toni.schoenbuchner at csgis.de
>>> >:
>>>
>>>> Hi Julierme,
>>>>
>>>>    from osgeo import ogr
>>>> ImportError: No module named osgeo
>>>>
>>>>
>>>> you´re on ubuntu, right? can you check:
>>>>
>>>> $ sudo apt-get install python-gdal gdal-bin libgdal20 libgdal-dev libgdal-devpython-gdal –y
>>>>
>>>> $ pip install pygdal==2.2.1.3
>>>>
>>>>
>>>> Cheers,
>>>>
>>>> Toni
>>>>
>>>> -----------------------------------------------
>>>> CSGIS
>>>>
>>>> -----------------------------------------------
>>>> Kolonnadenstraße 1
>>>> <https://maps.google.com/?q=Kolonnadenstra%C3%9Fe+1+04109+Leipzig&entry=gmail&source=g>
>>>> 04109 Leipzig
>>>> <https://maps.google.com/?q=Kolonnadenstra%C3%9Fe+1+04109+Leipzig&entry=gmail&source=g>
>>>> -----------------------------------------------
>>>> Mobil +49/ (0) 176 6680 3198
>>>> Tel  +49/ (0) 341 24 04 738
>>>> Fax  +49/ (0) 341 24 04 73
>>>> Web http://csgis.de
>>>> -----------------------------------------------
>>>>
>>>> Hinweis gemäß § 33 BDSG
>>>> Daten der Verfahrensbeteiligten werden gespeichert. Dieses Dokument ist
>>>> ausschließlich für den
>>>> Adressaten bestimmt. Der Inhalt der E-Mail ist vertraulich. Falls Sie
>>>> diese E-Mail versehentlich
>>>> erhalten haben, rufen Sie uns unter obiger Rufnummer umgehend an und
>>>> löschen Sie diese Nachricht
>>>> von Ihrem Computer. Jegliche Art von Reproduktionen, Verbreitung,
>>>> Vervielfältigung, Veränderung,
>>>> Verteilung und/oder Veröffentlichung dieser E-Mail ist verboten.
>>>>
>>>> Am 01.08.2018 um 19:12 schrieb geonode-users-request at lists.osgeo.org:
>>>>
>>>> ImportError: No module named osgeo
>>>>
>>>>
>>>>
>>> _______________________________________________
>>> 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/20180802/3caeae42/attachment-0001.html>


More information about the geonode-users mailing list