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\management\__init__.
py", line 353, in execute_from_command_line
    utility.execute()
  File 
"C:\ArchesProjects\ENV\lib\site-packages\django\core\management\__init__.
py", line 345, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File 
"C:\ArchesProjects\ENV\lib\site-packages\django\core\management\base.py",
 line 348, in run_from_argv
    self.execute(*args, **cmd_options)
  File 
"C:\ArchesProjects\ENV\lib\site-packages\django\core\management\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\management\__init__.
py", line 119, in call_command
    return command.execute(*args, **defaults)
  File 
"C:\ArchesProjects\ENV\lib\site-packages\django\core\management\base.py",
 line 399, in execute
    output = self.handle(*args, **options)
  File 
"C:\ArchesProjects\ENV\lib\site-packages\django\core\management\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\migrations\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\migrations\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\migrations\executor.py
", line 198, in apply_migration
    state = migration.apply(state, schema_editor)
  File 
"C:\ArchesProjects\ENV\lib\site-packages\django\db\migrations\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\migrations\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\sessions\backends
\base.py", line 48, in __getitem__
    return self._session[key]
  File 
"C:\ArchesProjects\ENV\lib\site-packages\django\contrib\sessions\backends
\base.py", line 198, in _get_session
    self._session_cache = self.load()
  File 
"C:\ArchesProjects\ENV\lib\site-packages\django\contrib\sessions\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\sql\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 archesproject@googlegroups.com. To unsubscribe, send 
email to archesproject+unsubscr...@googlegroups.com. 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 archesproject+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to