Re: [Arches] Failed Initial Migration for Models

2016-08-22 Thread Alexei Peters
Hi Sajan,
It looks like you're trying to run Arches by itself without a package.
Arches requires a package to be installed before it can be run successfully.

If you're just evaluating Arches, then the easiest way to get a package is
to install arches_hip into your virtualenv.

http://arches-hip.readthedocs.io/en/latest/getting-started/#installating-arches-hip

This should resolve the issue you're having.

BTW, Arches v4 is still in development and won't be ready for evaluation
for a month or so.

Cheers,
Alexei




Director of Web Development - Farallon Geographics, Inc. - 971.227.3173

On Mon, Aug 22, 2016 at 12:46 AM, Sajan Maharjan  wrote:

> Hello Alexei
>
> First of all thanks for pointing out my mistake but i couldnt find any of
> this information in any of the documentation.
>
> That certainly solved the problem for the models migration. And i no
> longer see a need for migrations,
>
> But I am back to the same error I had earlier, for which I felt I needed
> to migrate.
>
> In the page: http://localhost:8000/search
> relation "dates" does not exist
> LINE 1: ...AS "val__max", MIN("dates"."val") AS "val__min" FROM "dates"
>
> In the page: http://localhost:8000/map
> TypeError at /resources/markers/all
> 'NoneType' object has no attribute '__getitem__'
>
> Clearly It states that the database hasnt been loaded with data. I have
> looked into other posts here in this group.
> I looked into this post in the group, which tries to solve the issue.
> https://groups.google.com/forum/#!topic/archesproject/7I0U9zYZX-U
>
> But running the suggested command 'python manage.py packages -o install'
> gives the following error
>
> (ENV)sajan@ubuntu:~/arches-stable$ python manage.py packages -o install
> operation: install
> Traceback (most recent call last):
>   File "manage.py", line 27, in 
> execute_from_command_line(sys.argv)
>   File "/home/sajan/arches-stable/ENV/local/lib/python2.7/site-
> packages/django/core/management/__init__.py", line 399, in
> execute_from_command_line
> utility.execute()
>   File "/home/sajan/arches-stable/ENV/local/lib/python2.7/site-
> packages/django/core/management/__init__.py", line 392, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File "/home/sajan/arches-stable/ENV/local/lib/python2.7/site-
> packages/django/core/management/base.py", line 242, in run_from_argv
> self.execute(*args, **options.__dict__)
>   File "/home/sajan/arches-stable/ENV/local/lib/python2.7/site-
> packages/django/core/management/base.py", line 285, in execute
> output = self.handle(*args, **options)
>   File "/home/sajan/arches-stable/arches/management/commands/packages.py",
> line 66, in handle
> package_name = settings.PACKAGE_NAME
>   File "/home/sajan/arches-stable/ENV/local/lib/python2.7/site-
> packages/django/conf/__init__.py", line 55, in __getattr__
> return getattr(self._wrapped, name)
> AttributeError: 'Settings' object has no attribute 'PACKAGE_NAME'
>
> Any advice on how to resolve the issue?
>
> --
> -- 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.
>

-- 
-- 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.


Re: [Arches] Failed Initial Migration for Models

2016-08-22 Thread Sajan Maharjan
Hello Alexei

First of all thanks for pointing out my mistake but i couldnt find any of 
this information in any of the documentation.

That certainly solved the problem for the models migration. And i no longer 
see a need for migrations,

But I am back to the same error I had earlier, for which I felt I needed to 
migrate.

In the page: http://localhost:8000/search
relation "dates" does not exist
LINE 1: ...AS "val__max", MIN("dates"."val") AS "val__min" FROM "dates"

In the page: http://localhost:8000/map
TypeError at /resources/markers/all
'NoneType' object has no attribute '__getitem__'

Clearly It states that the database hasnt been loaded with data. I have 
looked into other posts here in this group.
I looked into this post in the group, which tries to solve the issue.
https://groups.google.com/forum/#!topic/archesproject/7I0U9zYZX-U

But running the suggested command 'python manage.py packages -o install' 
gives the following error

(ENV)sajan@ubuntu:~/arches-stable$ python manage.py packages -o install
operation: install
Traceback (most recent call last):
  File "manage.py", line 27, in 
execute_from_command_line(sys.argv)
  File 
"/home/sajan/arches-stable/ENV/local/lib/python2.7/site-packages/django/core/management/__init__.py",
 
line 399, in execute_from_command_line
utility.execute()
  File 
"/home/sajan/arches-stable/ENV/local/lib/python2.7/site-packages/django/core/management/__init__.py",
 
line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File 
"/home/sajan/arches-stable/ENV/local/lib/python2.7/site-packages/django/core/management/base.py",
 
line 242, in run_from_argv
self.execute(*args, **options.__dict__)
  File 
"/home/sajan/arches-stable/ENV/local/lib/python2.7/site-packages/django/core/management/base.py",
 
line 285, in execute
output = self.handle(*args, **options)
  File "/home/sajan/arches-stable/arches/management/commands/packages.py", 
line 66, in handle
package_name = settings.PACKAGE_NAME
  File 
"/home/sajan/arches-stable/ENV/local/lib/python2.7/site-packages/django/conf/__init__.py",
 
line 55, in __getattr__
return getattr(self._wrapped, name)
AttributeError: 'Settings' object has no attribute 'PACKAGE_NAME'

Any advice on how to resolve the issue?

-- 
-- 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.


Re: [Arches] Failed Initial Migration for Models

2016-08-21 Thread Alexei Peters
Hi Sajan,
If you're still using Arches v3 I would suggest that you stick with the v3
branch.
https://github.com/archesproject/arches/tree/stable/3.x

The latest in master is meant for v4 users and will require an upgrade to
postgres 9.5
Both 9.3 and 9.5 can be run at the same time on the same machine (just not
on the same port).

Cheers,
Alexei


Director of Web Development - Farallon Geographics, Inc. - 971.227.3173

On Sat, Aug 20, 2016 at 9:10 AM, Sajan Maharjan 
wrote:

> Here is the initial log for migration for models.
>
> The migration contains a field type 'jsonb' which is only supported by
> PostgreSQL 9.4, but ours runs on 9.3. Is there any solution for this? The
> system is running fine for now but we are missing the models migrations.
>
> (ENV)sajan@ubuntu:~/arches-master$ python manage.py migrate models
> Operations to perform:
>   Apply all migrations: models
> Running migrations:
>   Rendering model states... DONE
>   Applying models.0001_initial...Traceback (most recent call last):
>   File "manage.py", line 27, in 
> execute_from_command_line(sys.argv)
>   File "/home/sajan/arches-master/ENV/local/lib/python2.7/site-
> packages/django/core/management/__init__.py", line 367, in
> execute_from_command_line
> utility.execute()
>   File "/home/sajan/arches-master/ENV/local/lib/python2.7/site-
> packages/django/core/management/__init__.py", line 359, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File "/home/sajan/arches-master/ENV/local/lib/python2.7/site-
> packages/django/core/management/base.py", line 305, in run_from_argv
> self.execute(*args, **cmd_options)
>   File "/home/sajan/arches-master/ENV/local/lib/python2.7/site-
> packages/django/core/management/base.py", line 356, in execute
> output = self.handle(*args, **options)
>   File "/home/sajan/arches-master/ENV/local/lib/python2.7/site-
> packages/django/core/management/commands/migrate.py", line 202, in handle
> targets, plan, fake=fake, fake_initial=fake_initial
>   File "/home/sajan/arches-master/ENV/local/lib/python2.7/site-
> packages/django/db/migrations/executor.py", line 97, in migrate
> state = self._migrate_all_forwards(plan, full_plan, fake=fake,
> fake_initial=fake_initial)
>   File "/home/sajan/arches-master/ENV/local/lib/python2.7/site-
> packages/django/db/migrations/executor.py", line 132, in
> _migrate_all_forwards
> state = self.apply_migration(state, migration, fake=fake,
> fake_initial=fake_initial)
>   File "/home/sajan/arches-master/ENV/local/lib/python2.7/site-
> packages/django/db/migrations/executor.py", line 237, in apply_migration
> state = migration.apply(state, schema_editor)
>   File "/home/sajan/arches-master/ENV/local/lib/python2.7/site-
> packages/django/db/migrations/migration.py", line 129, in apply
> operation.database_forwards(self.app_label, schema_editor, old_state,
> project_state)
>   File "/home/sajan/arches-master/ENV/local/lib/python2.7/site-
> packages/django/db/migrations/operations/models.py", line 96, in
> database_forwards
> schema_editor.create_model(model)
>   File "/home/sajan/arches-master/ENV/local/lib/python2.7/site-
> packages/django/contrib/gis/db/backends/postgis/schema.py", line 56, in
> create_model
> super(PostGISSchemaEditor, self).create_model(model)
>   File "/home/sajan/arches-master/ENV/local/lib/python2.7/site-
> packages/django/db/backends/base/schema.py", line 295, in create_model
> self.execute(sql, params or None)
>   File "/home/sajan/arches-master/ENV/local/lib/python2.7/site-
> packages/django/db/backends/base/schema.py", line 112, in execute
> cursor.execute(sql, params)
>   File "/home/sajan/arches-master/ENV/local/lib/python2.7/site-
> packages/django/db/backends/utils.py", line 79, in execute
> return super(CursorDebugWrapper, self).execute(sql, params)
>   File "/home/sajan/arches-master/ENV/local/lib/python2.7/site-
> packages/django/db/backends/utils.py", line 64, in execute
> return self.cursor.execute(sql, params)
>   File 
> "/home/sajan/arches-master/ENV/local/lib/python2.7/site-packages/django/db/utils.py",
> line 94, in __exit__
> six.reraise(dj_exc_type, dj_exc_value, traceback)
>   File "/home/sajan/arches-master/ENV/local/lib/python2.7/site-
> packages/django/db/backends/utils.py", line 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...
>  ^
>
> (ENV)sajan@ubuntu:~/arches-master$
>
>
> --
> -- 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 

[Arches] Failed Initial Migration for Models

2016-08-20 Thread Sajan Maharjan
Here is the initial log for migration for models.

The migration contains a field type 'jsonb' which is only supported by 
PostgreSQL 9.4, but ours runs on 9.3. Is there any solution for this? The 
system is running fine for now but we are missing the models migrations.

(ENV)sajan@ubuntu:~/arches-master$ python manage.py migrate models
Operations to perform:
  Apply all migrations: models
Running migrations:
  Rendering model states... DONE
  Applying models.0001_initial...Traceback (most recent call last):
  File "manage.py", line 27, in 
execute_from_command_line(sys.argv)
  File 
"/home/sajan/arches-master/ENV/local/lib/python2.7/site-packages/django/core/management/__init__.py",
 
line 367, in execute_from_command_line
utility.execute()
  File 
"/home/sajan/arches-master/ENV/local/lib/python2.7/site-packages/django/core/management/__init__.py",
 
line 359, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File 
"/home/sajan/arches-master/ENV/local/lib/python2.7/site-packages/django/core/management/base.py",
 
line 305, in run_from_argv
self.execute(*args, **cmd_options)
  File 
"/home/sajan/arches-master/ENV/local/lib/python2.7/site-packages/django/core/management/base.py",
 
line 356, in execute
output = self.handle(*args, **options)
  File 
"/home/sajan/arches-master/ENV/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py",
 
line 202, in handle
targets, plan, fake=fake, fake_initial=fake_initial
  File 
"/home/sajan/arches-master/ENV/local/lib/python2.7/site-packages/django/db/migrations/executor.py",
 
line 97, in migrate
state = self._migrate_all_forwards(plan, full_plan, fake=fake, 
fake_initial=fake_initial)
  File 
"/home/sajan/arches-master/ENV/local/lib/python2.7/site-packages/django/db/migrations/executor.py",
 
line 132, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, 
fake_initial=fake_initial)
  File 
"/home/sajan/arches-master/ENV/local/lib/python2.7/site-packages/django/db/migrations/executor.py",
 
line 237, in apply_migration
state = migration.apply(state, schema_editor)
  File 
"/home/sajan/arches-master/ENV/local/lib/python2.7/site-packages/django/db/migrations/migration.py",
 
line 129, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, 
project_state)
  File 
"/home/sajan/arches-master/ENV/local/lib/python2.7/site-packages/django/db/migrations/operations/models.py",
 
line 96, in database_forwards
schema_editor.create_model(model)
  File 
"/home/sajan/arches-master/ENV/local/lib/python2.7/site-packages/django/contrib/gis/db/backends/postgis/schema.py",
 
line 56, in create_model
super(PostGISSchemaEditor, self).create_model(model)
  File 
"/home/sajan/arches-master/ENV/local/lib/python2.7/site-packages/django/db/backends/base/schema.py",
 
line 295, in create_model
self.execute(sql, params or None)
  File 
"/home/sajan/arches-master/ENV/local/lib/python2.7/site-packages/django/db/backends/base/schema.py",
 
line 112, in execute
cursor.execute(sql, params)
  File 
"/home/sajan/arches-master/ENV/local/lib/python2.7/site-packages/django/db/backends/utils.py",
 
line 79, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
  File 
"/home/sajan/arches-master/ENV/local/lib/python2.7/site-packages/django/db/backends/utils.py",
 
line 64, in execute
return self.cursor.execute(sql, params)
  File 
"/home/sajan/arches-master/ENV/local/lib/python2.7/site-packages/django/db/utils.py",
 
line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
  File 
"/home/sajan/arches-master/ENV/local/lib/python2.7/site-packages/django/db/backends/utils.py",
 
line 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...
 ^

(ENV)sajan@ubuntu:~/arches-master$ 


-- 
-- 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.