Sorry, that's right, we recently upgraded to 9.6 (required for spatial clustering)
Director of Web Development - Farallon Geographics, Inc. - 971.227.3173 On Mon, Apr 10, 2017 at 10:20 AM, Adam Cox <[email protected]> wrote: > Hi Alexei, Arches actually requires 9.6, as far as I've understood it (and > how we currently have it documented). > > Scott, it is a postgres version issue that you're seeing, just as Alexei > said. If you do need to have multiple postgres versions on your machine, > that is fine, you'll just have to make sure that Arches knows which port to > find 9.6 on (you can do this in the settings.py or settings_local.py file). > > Adam > > On Mon, Apr 10, 2017 at 12:15 PM, Alexei Peters <[email protected]> > wrote: > >> Hi Scott, >> What version of Postgres are you running? Arches requires 9.5 Looking >> at the error it looks like db schema wasn't loaded properly because of a >> reference to a jsonb column. As far as I know, jsonb wan't available until >> Postgres 9.4 >> Just so you know, you can run multiple versions of Postgres on a single >> machine if you're worried about upgrading (I'm in fact running 9.3, 9.4, >> 9.5 and 9.6). >> Cheers, >> Alexei >> >> >> Director of Web Development - Farallon Geographics, Inc. - 971.227.3173 >> <(971)%20227-3173> >> >> On Sat, Apr 8, 2017 at 9:11 AM, Scott Branting <[email protected]> >> wrote: >> >>> Perhaps related to this, I thought that Adam's .bat file ran through the >>> setup_db step. However, with Susan's issue with needing to do that step >>> and Joel running into an error on the additional setup database commands, I >>> tried to try recreating the database to see if I could solve this issue. I >>> ran python manage.py packages -o setup.db and ran into the following error. >>> >>> (ENV) C:\ArchesProjects\arches>python manage.py packages -o setup_db >>> operation: setup_db >>> package: arches >>> Password for user postgres: >>> pg_terminate_backend >>> ---------------------- >>> (0 rows) >>> >>> >>> DROP DATABASE >>> CREATE DATABASE >>> Operations to perform: >>> Apply all migrations: sessions, admin, guardian, auth, models, >>> contenttypes >>> Running migrations: >>> Rendering model states... DONE >>> Applying contenttypes.0001_initial... OK >>> Applying auth.0001_initial... OK >>> Applying admin.0001_initial... OK >>> Applying admin.0002_logentry_remove_auto_add... OK >>> Applying contenttypes.0002_remove_content_type_name... OK >>> Applying auth.0002_alter_permission_name_max_length... OK >>> Applying auth.0003_alter_user_email_max_length... OK >>> Applying auth.0004_alter_user_username_opts... OK >>> Applying auth.0005_alter_user_last_login_null... OK >>> Applying auth.0006_require_contenttypes_0002... OK >>> Applying auth.0007_alter_validators_add_error_messages... OK >>> Applying guardian.0001_initial... OK >>> Applying models.0001_initial...Traceback (most recent call last): >>> File "manage.py", line 27, in <module> >>> execute_from_command_line(sys.argv) >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\core\managem >>> ent\__init__. >>> py", line 353, in execute_from_command_line >>> utility.execute() >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\core\managem >>> ent\__init__. >>> py", line 345, in execute >>> self.fetch_command(subcommand).run_from_argv(self.argv) >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\core\managem >>> ent\base.py", >>> line 348, in run_from_argv >>> self.execute(*args, **cmd_options) >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\core\managem >>> ent\base.py", >>> line 399, in execute >>> output = self.handle(*args, **options) >>> File "C:\ArchesProjects\arches\arches\management\commands\packages.py", >>> line 1 >>> 25, in handle >>> self.setup_db(package_name) >>> File "C:\ArchesProjects\arches\arches\management\commands\packages.py", >>> line 2 >>> 62, in setup_db >>> management.call_command('migrate') >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\core\managem >>> ent\__init__. >>> py", line 119, in call_command >>> return command.execute(*args, **defaults) >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\core\managem >>> ent\base.py", >>> line 399, in execute >>> output = self.handle(*args, **options) >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\core\managem >>> ent\commands\ >>> migrate.py", line 200, in handle >>> executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial) >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\db\migration >>> s\executor.py >>> ", line 92, in migrate >>> self._migrate_all_forwards(plan, full_plan, fake=fake, >>> fake_initial=fake_ini >>> tial) >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\db\migration >>> s\executor.py >>> ", line 121, in _migrate_all_forwards >>> state = self.apply_migration(state, migration, fake=fake, >>> fake_initial=fake_ >>> initial) >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\db\migration >>> s\executor.py >>> ", line 198, in apply_migration >>> state = migration.apply(state, schema_editor) >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\db\migration >>> s\migration.p >>> y", line 123, in apply >>> operation.database_forwards(self.app_label, schema_editor, >>> old_state, projec >>> t_state) >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\db\migration >>> s\operations\ >>> models.py", line 59, in database_forwards >>> schema_editor.create_model(model) >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\contrib\gis\ >>> db\backends\p >>> ostgis\schema.py", line 56, in create_model >>> super(PostGISSchemaEditor, self).create_model(model) >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\db\backends\ >>> base\schema.p >>> y", line 284, in create_model >>> self.execute(sql, params or None) >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\db\backends\ >>> base\schema.p >>> y", line 110, in execute >>> cursor.execute(sql, params) >>> File >>> "C:\ArchesProjects\ENV\lib\site-packages\django\db\backends\utils.py", >>> li >>> ne 79, in execute >>> return super(CursorDebugWrapper, self).execute(sql, params) >>> File >>> "C:\ArchesProjects\ENV\lib\site-packages\django\db\backends\utils.py", >>> li >>> ne 64, in execute >>> return self.cursor.execute(sql, params) >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\db\utils.py", >>> line 95, in >>> __exit__ >>> six.reraise(dj_exc_type, dj_exc_value, traceback) >>> File >>> "C:\ArchesProjects\ENV\lib\site-packages\django\db\backends\utils.py", >>> li >>> ne 62, in execute >>> return self.cursor.execute(sql) >>> django.db.utils.ProgrammingError: type "jsonb" does not exist >>> LINE 1: ...OT NULL, "id" uuid NOT NULL PRIMARY KEY, "config" jsonb >>> NULL... >>> >>> >>> >>> >>> Following this, when I try to run the Django server it now fails once I >>> login to localhost:8000 with the following error. (Previously it brought >>> up the landing page without any issues.) >>> >>> >>> (ENV) C:\ArchesProjects\arches>python manage.py runserver >>> Performing system checks... >>> >>> System check identified no issues (0 silenced). >>> >>> You have unapplied migrations; your app may not work properly until they >>> are app >>> lied. >>> Run 'python manage.py migrate' to apply them. >>> April 08, 2017 - 12:04:01 >>> Django version 1.9.2, using settings 'arches.settings' >>> Starting development server at http://127.0.0.1:8000/ >>> Quit the server with CTRL-BREAK. >>> Internal Server Error: / >>> Traceback (most recent call last): >>> File >>> "C:\ArchesProjects\ENV\lib\site-packages\django\core\handlers\base.py", >>> l >>> ine 123, in get_response >>> response = middleware_method(request) >>> File "C:\ArchesProjects\arches\arches\app\utils\set_anonymous_user.py", >>> line 6 >>> , in process_request >>> if request.user.is_anonymous(): >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\utils\functional.py", >>> lin >>> e 204, in inner >>> self._setup() >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\utils\functional.py", >>> lin >>> e 351, in _setup >>> self._wrapped = self._setupfunc() >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\contrib\auth >>> \middleware.p >>> y", line 22, in <lambda> >>> request.user = SimpleLazyObject(lambda: get_user(request)) >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\contrib\auth >>> \middleware.p >>> y", line 10, in get_user >>> request._cached_user = auth.get_user(request) >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\contrib\auth >>> \__init__.py" >>> , line 167, in get_user >>> user_id = _get_user_session_key(request) >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\contrib\auth >>> \__init__.py" >>> , line 59, in _get_user_session_key >>> return get_user_model()._meta.pk.to_python(request.session[SESSION_ >>> KEY]) >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\contrib\sess >>> ions\backends >>> \base.py", line 48, in __getitem__ >>> return self._session[key] >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\contrib\sess >>> ions\backends >>> \base.py", line 198, in _get_session >>> self._session_cache = self.load() >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\contrib\sess >>> ions\backends >>> \db.py", line 33, in load >>> expire_date__gt=timezone.now() >>> File >>> "C:\ArchesProjects\ENV\lib\site-packages\django\db\models\manager.py", >>> li >>> ne 122, in manager_method >>> return getattr(self.get_queryset(), name)(*args, **kwargs) >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\db\models\query.py", >>> line >>> 381, in get >>> num = len(clone) >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\db\models\query.py", >>> line >>> 240, in __len__ >>> self._fetch_all() >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\db\models\query.py", >>> line >>> 1074, in _fetch_all >>> self._result_cache = list(self.iterator()) >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\db\models\query.py", >>> line >>> 52, in __iter__ >>> results = compiler.execute_sql() >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\db\models\sq >>> l\compiler.py >>> ", line 848, in execute_sql >>> cursor.execute(sql, params) >>> File >>> "C:\ArchesProjects\ENV\lib\site-packages\django\db\backends\utils.py", >>> li >>> ne 79, in execute >>> return super(CursorDebugWrapper, self).execute(sql, params) >>> File >>> "C:\ArchesProjects\ENV\lib\site-packages\django\db\backends\utils.py", >>> li >>> ne 64, in execute >>> return self.cursor.execute(sql, params) >>> File "C:\ArchesProjects\ENV\lib\site-packages\django\db\utils.py", >>> line 95, in >>> __exit__ >>> six.reraise(dj_exc_type, dj_exc_value, traceback) >>> File >>> "C:\ArchesProjects\ENV\lib\site-packages\django\db\backends\utils.py", >>> li >>> ne 64, in execute >>> return self.cursor.execute(sql, params) >>> ProgrammingError: relation "django_session" does not exist >>> LINE 1: ...ession_data", "django_session"."expire_date" FROM >>> "django_se... >>> ^ >>> >>> Thanks, >>> >>> Scott >>> ASOR CHI >>> >>> -- >>> -- To post, send email to [email protected]. To >>> unsubscribe, send email to [email protected]. >>> For more information, visit https://groups.google.com/d/fo >>> rum/archesproject?hl=en >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "Arches Project" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- >> -- To post, send email to [email protected]. To >> unsubscribe, send email to [email protected]. >> For more information, visit https://groups.google.com/d/fo >> rum/archesproject?hl=en >> --- >> You received this message because you are subscribed to the Google Groups >> "Arches Project" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/d/optout. >> > > -- -- To post, send email to [email protected]. To unsubscribe, send email to [email protected]. For more information, visit https://groups.google.com/d/forum/archesproject?hl=en --- You received this message because you are subscribed to the Google Groups "Arches Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
