Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error installing GeoNode 2.8 for development #4339

Closed
tomasjuanl opened this issue Apr 3, 2019 · 17 comments
Closed

Error installing GeoNode 2.8 for development #4339

tomasjuanl opened this issue Apr 3, 2019 · 17 comments
Labels
major A high priority issue which might affect a lot of people or large parts of the codebase

Comments

@tomasjuanl
Copy link

tomasjuanl commented Apr 3, 2019

Trying to install GeoNode 2.8 (from tag 2.8.0+thefinal0) for development in Ubuntu 14.04.

When i run the step:
pip install -r requirements.txt --no-deps

I got the following error:

Downloading/unpacking Django==1.8.19 (from -r requirements.txt (line 1))
  Downloading Django-1.8.19-py2.py3-none-any.whl (6.2MB): 6.2MB downloaded
Downloading/unpacking six==1.10.0 (from -r requirements.txt (line 2))
  Downloading six-1.10.0-py2.py3-none-any.whl
Downloading/unpacking amqp==2.2.2 (from -r requirements.txt (line 3))
  Downloading amqp-2.2.2-py2.py3-none-any.whl (48kB): 48kB downloaded
Downloading/unpacking anyjson==0.3.3 (from -r requirements.txt (line 4))
  Downloading anyjson-0.3.3.tar.gz
  Running setup.py (path:/home/administrator/venv/build/anyjson/setup.py) egg_info for package anyjson
    
Downloading/unpacking arrow==0.12.1 (from -r requirements.txt (line 5))
  Downloading arrow-0.12.1.tar.gz (65kB): 65kB downloaded
  Running setup.py (path:/home/administrator/venv/build/arrow/setup.py) egg_info for package arrow
    
Downloading/unpacking attrs==17.4.0 (from -r requirements.txt (line 6))
  Downloading attrs-17.4.0-py2.py3-none-any.whl
Downloading/unpacking autoflake==0.7 (from -r requirements.txt (line 7))
  Downloading autoflake-0.7.tar.gz
  Running setup.py (path:/home/administrator/venv/build/autoflake/setup.py) egg_info for package autoflake
    
    warning: no previously-included files found matching '.travis.yml'
    warning: no previously-included files found matching 'Makefile'
    warning: no previously-included files found matching 'test_fuzz.py'
    warning: no previously-included files found matching 'test_fuzz_pypi.py'
Downloading/unpacking awesome-slugify==1.6.5 (from -r requirements.txt (line 8))
  Downloading awesome-slugify-1.6.5.tar.gz
  Running setup.py (path:/home/administrator/venv/build/awesome-slugify/setup.py) egg_info for package awesome-slugify
    
Downloading/unpacking backports.functools-lru-cache==1.5 (from -r requirements.txt (line 9))
  Downloading backports.functools_lru_cache-1.5-py2.py3-none-any.whl
Downloading/unpacking beautifulsoup4==4.4.1 (from -r requirements.txt (line 10))
  Downloading beautifulsoup4-4.4.1-py2-none-any.whl (81kB): 81kB downloaded
Downloading/unpacking billiard==3.5.0.3 (from -r requirements.txt (line 11))
  Downloading billiard-3.5.0.3.tar.gz (149kB): 149kB downloaded
  Running setup.py (path:/home/administrator/venv/build/billiard/setup.py) egg_info for package billiard
    
    warning: no files found matching '*.py' under directory 'Lib'
    warning: no files found matching '*.py' under directory 'funtests'
    warning: no previously-included files matching '*' found under directory 'docs/_build'
    warning: no previously-included files matching '__pycache__' found under directory '*'
    warning: no previously-included files matching '*.py[co]' found under directory '*'
    warning: no previously-included files matching '.*.sw*' found under directory '*'
Downloading/unpacking boto==2.38.0 (from -r requirements.txt (line 12))
  Downloading boto-2.38.0-py2.py3-none-any.whl (1.3MB): 1.3MB downloaded
Downloading/unpacking celery==4.1.0 (from -r requirements.txt (line 13))
  Downloading celery-4.1.0-py2.py3-none-any.whl (400kB): 400kB downloaded
Downloading/unpacking certifi==2018.1.18 (from -r requirements.txt (line 14))
  Downloading certifi-2018.1.18-py2.py3-none-any.whl (151kB): 151kB downloaded
Downloading/unpacking chardet==3.0.4 (from -r requirements.txt (line 15))
  Downloading chardet-3.0.4-py2.py3-none-any.whl (133kB): 133kB downloaded
Downloading/unpacking click==6.7 (from -r requirements.txt (line 16))
  Downloading click-6.7-py2.py3-none-any.whl (71kB): 71kB downloaded
Downloading/unpacking coreapi==2.3.3 (from -r requirements.txt (line 17))
  Downloading coreapi-2.3.3-py2.py3-none-any.whl
Downloading/unpacking coreschema==0.0.4 (from -r requirements.txt (line 18))
  Downloading coreschema-0.0.4-py2-none-any.whl
Downloading/unpacking coverage==4.4.1 (from -r requirements.txt (line 19))
  Downloading coverage-4.4.1.tar.gz (369kB): 369kB downloaded
  Running setup.py (path:/home/administrator/venv/build/coverage/setup.py) egg_info for package coverage
    
    warning: no previously-included files found matching 'ci/appveyor.token'
    no previously-included directories found matching 'doc/_build'
    no previously-included directories found matching 'tests/eggsrc/build'
    no previously-included directories found matching 'tests/eggsrc/dist'
    no previously-included directories found matching 'tests/eggsrc/*.egg-info'
    warning: no previously-included files matching '*.py[co]' found anywhere in distribution
Downloading/unpacking decorator==4.1.2 (from -r requirements.txt (line 20))
  Downloading decorator-4.1.2-py2.py3-none-any.whl
Downloading/unpacking diff-match-patch==20121119 (from -r requirements.txt (line 21))
  Downloading diff-match-patch-20121119.tar.gz (54kB): 54kB downloaded
  Running setup.py (path:/home/administrator/venv/build/diff-match-patch/setup.py) egg_info for package diff-match-patch
    
Downloading/unpacking dj-database-url==0.4.2 (from -r requirements.txt (line 22))
  Downloading dj_database_url-0.4.2-py2.py3-none-any.whl
**Downloading/unpacking dj-pagination==2.3.2 (from -r requirements.txt (line 23))
  Downloading dj-pagination-2.3.2.tar.gz
  Running setup.py (path:/home/administrator/venv/build/dj-pagination/setup.py) egg_info for package dj-pagination
    error in dj-pagination setup command: Invalid environment marker: python_version < "3.0"
    Complete output from command python setup.py egg_info:
    error in dj-pagination setup command: Invalid environment marker: python_version < "3.0"**

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /home/administrator/venv/build/dj-pagination
Storing debug log for failure in /home/administrator/.pip/pip.log
@t-book
Copy link
Contributor

t-book commented Apr 3, 2019

Might be an issue with pip version in trusty. Any chance you try with xenial (16.04)?

@tomasjuanl
Copy link
Author

tomasjuanl commented Apr 3, 2019

Already trying in 16.04. I'm having all kind of problems. The dependencies install OK.

  1. paver setup fails for different reasons.
    a) the URL's in dev_config.yml for downloading geoserver are wrong. I had to use the newones from master branch.
    b) There's a import bug in awesome-slugify for python 2.7.12 (the version of python 16.04 installs). I had to touch by hand files of that library to make it work.
    c) Paver setup fails to download and install data-2.12.2.zip for geoserver. I had to do it manually.
    After that paver setup works fine.

  2. paver start/sync fails with the following error:

Traceback (most recent call last):
  File "manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/home/administrator/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
    utility.execute()
  File "/home/administrator/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 346, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/administrator/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 394, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/administrator/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 445, in execute
    output = self.handle(*args, **options)
  File "/home/administrator/env/local/lib/python2.7/site-packages/django/core/management/commands/makemigrations.py", line 63, in handle
    loader = MigrationLoader(None, ignore_no_migrations=True)
  File "/home/administrator/env/local/lib/python2.7/site-packages/django/db/migrations/loader.py", line 47, in __init__
    self.build_graph()
  File "/home/administrator/env/local/lib/python2.7/site-packages/django/db/migrations/loader.py", line 185, in build_graph
    self.load_disk()
  File "/home/administrator/env/local/lib/python2.7/site-packages/django/db/migrations/loader.py", line 103, in load_disk
    migration_module = import_module("%s.%s" % (module_name, migration_name))
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/administrator/env/local/lib/python2.7/site-packages/oauth2_provider/migrations/0008_idtoken.py", line 18, in <module>
    class Migration(migrations.Migration):
  File "/home/administrator/env/local/lib/python2.7/site-packages/oauth2_provider/migrations/0008_idtoken.py", line 30, in Migration
    ('id', models.BigAutoField(primary_key=True, serialize=False)),
AttributeError: 'module' object has no attribute 'BigAutoField'

Change that by hand to AutoField instead of BigAutoField (i inspected all classes in that module). 
That worked, and now i have the following error: 

Traceback (most recent call last):
  File "/home/administrator/env/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 229, in wrapper
    fn(*args, **kwargs)
  File "/home/administrator/env/local/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 116, in inner_run
    self.check_migrations()
  File "/home/administrator/env/local/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 168, in check_migrations
    executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
  File "/home/administrator/env/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 19, in __init__
    self.loader = MigrationLoader(self.connection)
  File "/home/administrator/env/local/lib/python2.7/site-packages/django/db/migrations/loader.py", line 47, in __init__
    self.build_graph()
  File "/home/administrator/env/local/lib/python2.7/site-packages/django/db/migrations/loader.py", line 185, in build_graph
    self.load_disk()
  File "/home/administrator/env/local/lib/python2.7/site-packages/django/db/migrations/loader.py", line 103, in load_disk
    migration_module = import_module("%s.%s" % (module_name, migration_name))
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/administrator/env/local/lib/python2.7/site-packages/oauth2_provider/migrations/0006_auto_20171214_2232.py", line 11, in <module>
    class Migration(migrations.Migration):
  File "/home/administrator/env/local/lib/python2.7/site-packages/oauth2_provider/migrations/0006_auto_20171214_2232.py", line 21, in Migration
    field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=oauth2_settings.REFRESH_TOKEN_MODEL, related_name='refreshed_access_token'),
  File "/home/administrator/env/local/lib/python2.7/site-packages/oauth2_provider/settings.py", line 118, in __getattr__
    raise AttributeError("Invalid OAuth2Provider setting: '%s'" % attr)
AttributeError: Invalid OAuth2Provider setting: 'REFRESH_TOKEN_MODEL'

@t-book
Copy link
Contributor

t-book commented Apr 3, 2019

Strange just tried on 16.04 without problems. Sure you´re using the right branch? 2.8 dev_config.yml does have working geoserver and geoserver-data-directory settings: https://github.com/GeoNode/geonode/blob/2.8.x/dev_config.yml
Also it´s advisable to use master branch has it has several important bug fixes

@tomasjuanl
Copy link
Author

I'm using the tag 2.8.0+thefinal. I have to use the branch instead?

@tomasjuanl
Copy link
Author

tomasjuanl commented Apr 3, 2019

The master branch is stable? We need a stable version for doing minor changes and go to production.

@t-book
Copy link
Contributor

t-book commented Apr 4, 2019

If you stay with 2.8. be sure to checkout 2.8.1. You might need to update the geoserver download endpoints as shown above.

But I definitely suggest using master branch which is already 2.10 rc4. You will get several bugfixes which due to resources might not be backported to 2.8. Further a newer geoserver version and you will be ready for important improvements (#4326) (#4276) which will soon land in master.

Besides, have you seen that there is geonode-project which is meant to be used for customizations? https://github.com/GeoNode/geonode-project
This workshop http://geonode.org/dev-workshop/#/ will help you getting started. In case of questions don´t hesistate to ask.

@frafra
Copy link
Contributor

frafra commented Apr 4, 2019

error in dj-pagination setup command: Invalid environment marker: python_version < "3.0"**

Try to update setuptools.

@tomasjuanl
Copy link
Author

tomasjuanl commented Apr 4, 2019

I'll take a look to that geonode-project to see if that suits our needs.

Thanks @frafra for your suggestion. I think i'll no longer use Ubuntu 14, so that problem with dj-pagination is not a problem for me anymore. But is going to be for anyone trying to use Ubuntu 14 and Geonode 2.8.0+thefinal0

@t-book you mean the tag 2.8.1+rc0 ?

I'll will analyze the 2.10 rc4 option. Maybe its the best decision. I can assume that a rc4 is stable enough? As I said, we need to go to production for a project in which GeoNode is one of the components (an important one). So we need a stable version, but we need to do some minor changes (like disable one field in the user profile form), and things like that. So we need to touch back-end code.

@tomasjuanl
Copy link
Author

tomasjuanl commented Apr 4, 2019

I confirm that the tag 2.8.1+rc0 also has problems, beside the bad URL's for downloading geoserver.

When i run paver sync:

---> pavement.sync
 python -W ignore manage.py makemigrations --noinput
Traceback (most recent call last):
  File "manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/home/administrator/env2/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
    utility.execute()
  File "/home/administrator/env2/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 346, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/administrator/env2/local/lib/python2.7/site-packages/django/core/management/base.py", line 394, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/administrator/env2/local/lib/python2.7/site-packages/django/core/management/base.py", line 445, in execute
    output = self.handle(*args, **options)
  File "/home/administrator/env2/local/lib/python2.7/site-packages/django/core/management/commands/makemigrations.py", line 63, in handle
    loader = MigrationLoader(None, ignore_no_migrations=True)
  File "/home/administrator/env2/local/lib/python2.7/site-packages/django/db/migrations/loader.py", line 47, in __init__
    self.build_graph()
  File "/home/administrator/env2/local/lib/python2.7/site-packages/django/db/migrations/loader.py", line 308, in build_graph
    _reraise_missing_dependency(migration, parent, e)
  File "/home/administrator/env2/local/lib/python2.7/site-packages/django/db/migrations/loader.py", line 291, in _reraise_missing_dependency
    raise exc
django.db.migrations.graph.NodeNotFoundError: Migration maps.0031_auto_20190403_2103 dependencies reference nonexistent parent node (u'maps', u'0030_auto_20180414_2120')

I think there are general problems with the freezing of versions. Maybe in the past they worked well but with libraries upgrades they break.
I confirm that version in branch 2.8.x works well.

What is the recomendation at this point if i want to use 2.8 ?

@t-book
Copy link
Contributor

t-book commented Apr 4, 2019

@t-book you mean the tag 2.8.1+rc0 ?

Yep.

I'll will analyze the 2.10 rc4 option. Maybe its the best decision. I can assume that a rc4 is stable enough?

Master branch is quite volatile. But yes I know a lot who choose master instead 2.8 (stable) for production. (I do myself with several instances.)

As I said, we need to go to production for a project in which GeoNode is one of the components (an important one). So we need a stable version, but we need to do some minor changes (like disable one field in the user profile form), and things like that. So we need to touch back-end code.

Depending on your need you might only need to change templates or views. But even with models geonode-project is meant to be used ffor customisations.

@tomasjuanl
Copy link
Author

Is there a clean Changelog for 2.10+rc4 to see what are all the improvements and new features this versions has with respecto to 2.8 ?

@t-book
Copy link
Contributor

t-book commented Apr 4, 2019

not that I know of

@t-book
Copy link
Contributor

t-book commented Apr 6, 2019

Is there a clean Changelog for 2.10+rc4 to see what are all the improvements and new features this versions has with respecto to 2.8 ?

A little 'changelog' helper for you. All commits since 2.8 tag nice and readable: https://codepen.io/t-book/full/JVKBpB

git log ...2.8 --date=format:'%Y-%m-%d' --pretty=format:'<li> %ad: %an <a href="http://github.com/geonode/geonode/commit/%H" target="blank">% s</a></li> '  | grep -v Merge > /tmp/changelog.html

@t-book t-book added the major A high priority issue which might affect a lot of people or large parts of the codebase label Apr 6, 2019
srtonz pushed a commit to srtonz/geonode that referenced this issue Apr 18, 2019
This fixes an error described in GeoNode#4339 (comment) causing migrations to fail on new dev environments.
@tomasjuanl
Copy link
Author

Is there a clean Changelog for 2.10+rc4 to see what are all the improvements and new features this versions has with respecto to 2.8 ?

A little 'changelog' helper for you. All commits since 2.8 tag nice and readable: https://codepen.io/t-book/full/JVKBpB

git log ...2.8 --date=format:'%Y-%m-%d' --pretty=format:'<li> %ad: %an <a href="http://github.com/geonode/geonode/commit/%H" target="blank">% s</a></li> '  | grep -v Merge > /tmp/changelog.html

Thank you very much for this @t-book !

@t-book
Copy link
Contributor

t-book commented May 21, 2019

@tomasjuanl can we close this issue?

@tomasjuanl
Copy link
Author

@tomasjuanl can we close this issue?

I'm using master branch now. I have no problems related to this anymore. You can close this issue if its not a problem for anyone trying to install 2.8 version.

Regards,

@t-book
Copy link
Contributor

t-book commented May 22, 2019

Thanks!

@t-book t-book closed this as completed May 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major A high priority issue which might affect a lot of people or large parts of the codebase
Projects
None yet
Development

No branches or pull requests

3 participants