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

Cannot apply fixtures from Docker #52

Closed
frafra opened this issue Dec 4, 2018 · 5 comments
Closed

Cannot apply fixtures from Docker #52

frafra opened this issue Dec 4, 2018 · 5 comments
Labels

Comments

@frafra
Copy link
Collaborator

frafra commented Dec 4, 2018

Branch: 2.8

django4my_geonode | Synchronizing apps without migrations:
django4my_geonode |   Creating tables...
django4my_geonode |     Running deferred SQL...
django4my_geonode |   Installing custom SQL...
db4my_geonode    | ERROR:  relation "base_topiccategory" does not exist at character 8
db4my_geonode    | STATEMENT:  UPDATE "base_topiccategory" SET "identifier" = 'geoscientificInformation', "description" = 'information pertaining to earth sciences. Examples: geophysical features and processes, geology, minerals, sciences dealing with the composition, structure and origin of the earth s rocks, risks of earthquakes, volcanic activity, landslides, gravity information, soils, permafrost, hydrogeology, erosion', "description_en" = 'information pertaining to earth sciences. Examples: geophysical features and processes, geology, minerals, sciences dealing with the composition, structure and origin of the earth s rocks, risks of earthquakes, volcanic activity, landslides, gravity information, soils, permafrost, hydrogeology, erosion', "gn_description" = 'Geoscientific Information', "gn_description_en" = 'Geoscientific Information', "is_choice" = true, "fa_class" = 'fa-bullseye' WHERE "base_topiccategory"."id" = 1
celery4my_geonode | Operations to perform:
celery4my_geonode |   Synchronize unmigrated apps: django_basic_auth, tasks, floppyforms, allauth, modeltranslation, django_extensions, rest_framework, polymorphic, treebeard, corsheaders, geonode, django_forms_bootstrap, catalogue, humanize, bootstrap3_datetime, api_basemaps, storages, mptt, staticfiles, metadataxsl, geoexplorer, sitemaps, proxy, gis, pinax_theme_bootstrap, autocomplete_light, messages, leaflet, api, my_geonode, social, messaging, security, dj_pagination, ows_api
celery4my_geonode |   Apply all migrations: dialogos, people, tastypie, agon_ratings, documents, actstream, sites, maps, contenttypes, announcements, user_messages, layers, sessions, guardian, auth, invitations, base, pinax_notifications, groups, services, oauth2_provider, account, admin, geonode_themes, upload, geonode_client, avatar, taggit, socialaccount
celery4my_geonode | Synchronizing apps without migrations:
celery4my_geonode |   Creating tables...
celery4my_geonode |     Running deferred SQL...
celery4my_geonode |   Installing custom SQL...
django4my_geonode | Traceback (most recent call last):
django4my_geonode |   File "manage.py", line 31, in <module>
django4my_geonode |     execute_from_command_line(sys.argv)
django4my_geonode |   File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
django4my_geonode |     utility.execute()
django4my_geonode |   File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 346, in execute
django4my_geonode |     self.fetch_command(subcommand).run_from_argv(self.argv)
django4my_geonode |   File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 394, in run_from_argv
django4my_geonode |     self.execute(*args, **cmd_options)
django4my_geonode |   File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 445, in execute
django4my_geonode |     output = self.handle(*args, **options)
django4my_geonode |   File "/usr/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 179, in handle
django4my_geonode |     created_models = self.sync_apps(connection, executor.loader.unmigrated_apps)
django4my_geonode |   File "/usr/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 365, in sync_apps
django4my_geonode |     hide_empty=True,
django4my_geonode |   File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 120, in call_command
django4my_geonode |     return command.execute(*args, **defaults)
django4my_geonode |   File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 445, in execute
django4my_geonode |     output = self.handle(*args, **options)
django4my_geonode |   File "/usr/local/lib/python2.7/site-packages/modeltranslation/management/commands/loaddata.py", line 61, in handle
django4my_geonode |     return super(Command, self).handle(*fixture_labels, **options)
django4my_geonode |   File "/usr/local/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 60, in handle
django4my_geonode |     self.loaddata(fixture_labels)
django4my_geonode |   File "/usr/local/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 100, in loaddata
django4my_geonode |     self.load_label(fixture_label)
django4my_geonode |   File "/usr/local/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 157, in load_label
django4my_geonode |     obj.save(using=self.using)
django4my_geonode |   File "/usr/local/lib/python2.7/site-packages/django/core/serializers/base.py", line 173, in save
django4my_geonode |     models.Model.save_base(self.object, using=using, raw=True)
django4my_geonode |   File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py", line 762, in save_base
django4my_geonode |     updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
django4my_geonode |   File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py", line 827, in _save_table
django4my_geonode |     forced_update)
django4my_geonode |   File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py", line 877, in _do_update
django4my_geonode |     return filtered._update(values) > 0
django4my_geonode |   File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 580, in _update
django4my_geonode |     return query.get_compiler(self.db).execute_sql(CURSOR)
django4my_geonode |   File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 1062, in execute_sql
django4my_geonode |     cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
django4my_geonode |   File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 840, in execute_sql
django4my_geonode |     cursor.execute(sql, params)
django4my_geonode |   File "/usr/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 79, in execute
django4my_geonode |     return super(CursorDebugWrapper, self).execute(sql, params)
django4my_geonode |   File "/usr/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
django4my_geonode |     return self.cursor.execute(sql, params)
django4my_geonode |   File "/usr/local/lib/python2.7/site-packages/django/db/utils.py", line 98, in __exit__
django4my_geonode |     six.reraise(dj_exc_type, dj_exc_value, traceback)
django4my_geonode |   File "/usr/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
django4my_geonode |     return self.cursor.execute(sql, params)
django4my_geonode | django.db.utils.ProgrammingError: Problem installing fixture '/usr/src/my_geonode/my_geonode/fixtures/initial_data.json': Could not load base.TopicCategory(pk=1): relation "base_topiccategory" does not exist
django4my_geonode | LINE 1: UPDATE "base_topiccategory" SET "identifier" = 'geoscientifi...
django4my_geonode |                ^
django4my_geonode |
db4my_geonode    | ERROR:  relation "base_topiccategory" does not exist at character 8
db4my_geonode    | STATEMENT:  UPDATE "base_topiccategory" SET "identifier" = 'geoscientificInformation', "description" = 'information pertaining to earth sciences. Examples: geophysical features and processes, geology, minerals, sciences dealing with the composition, structure and origin of the earth s rocks, risks of earthquakes, volcanic activity, landslides, gravity information, soils, permafrost, hydrogeology, erosion', "description_en" = 'information pertaining to earth sciences. Examples: geophysical features and processes, geology, minerals, sciences dealing with the composition, structure and origin of the earth s rocks, risks of earthquakes, volcanic activity, landslides, gravity information, soils, permafrost, hydrogeology, erosion', "gn_description" = 'Geoscientific Information', "gn_description_en" = 'Geoscientific Information', "is_choice" = true, "fa_class" = 'fa-bullseye' WHERE "base_topiccategory"."id" = 1
@frafra frafra mentioned this issue Dec 4, 2018
@frafra
Copy link
Collaborator Author

frafra commented Dec 6, 2018

This bug is not critical, because the default policy is restarting the containers every time something goes bad.
It would be nice to have a working docker-compose.yml without restarts.

@afabiani
Copy link
Member

afabiani commented Dec 7, 2018

@frafra thanks, will take a look asap.

@t-book
Copy link
Contributor

t-book commented Jul 2, 2020

@frafra can we close here?

@frafra
Copy link
Collaborator Author

frafra commented Jul 3, 2020

@t-book I guess so. I do not see it in recent logs.

@t-book
Copy link
Contributor

t-book commented Jul 3, 2020

thanks!

@t-book t-book closed this as completed Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants