Re: [Arches] Upgrade to 4.3 fails

2018-09-04 Thread Rob Gaston
Closing the thread on this… we tracked down Dale’s issue. 

A 4.3.1 release will ship shortly so that future migrations will not encounter 
this error. 

In the meanwhile, the issue can be worked around by running the following SQL 
prior to migration:

update reports
set config = '{}'::json
where config is NULL;


- Rob


> On Sep 3, 2018, at 5:16 AM, Dale Lloyd  wrote:
> 
> When I typed 'python manage.py migrate', i got the following error:
> 
> Operations to perform:
>   Apply all migrations: admin, auth, contenttypes, guardian, models, 
> oauth2_provider, sessions
> Running migrations:
>   Applying models.3201_second_removal_of_node_nodetype_branch... OK
>   Applying models.deserialize_provisional_edits... OK
>   Applying models.3385_add_provisional_user_fields... OK
>   Applying models.3454_graph_node_sort_order... OK
>   Applying models.3601_remove_forms... OK
>   Applying models.3724_report_manager... OK
>   Applying models.3724_report_manager_2...Traceback (most recent call last):
>   File "manage.py", line 29, in 
> execute_from_command_line(sys.argv)
>   File 
> "/opt/Projects/ENV/local/lib/python2.7/site-packages/django/core/management/__init__.py",
>  line 364, in execute_from_command_line
> utility.execute()
>   File 
> "/opt/Projects/ENV/local/lib/python2.7/site-packages/django/core/management/__init__.py",
>  line 356, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File 
> "/opt/Projects/ENV/local/lib/python2.7/site-packages/django/core/management/base.py",
>  line 283, in run_from_argv
> self.execute(*args, **cmd_options)
>   File 
> "/opt/Projects/ENV/local/lib/python2.7/site-packages/django/core/management/base.py",
>  line 330, in execute
> output = self.handle(*args, **options)
>   File 
> "/opt/Projects/ENV/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py",
>  line 204, in handle
> fake_initial=fake_initial,
>   File 
> "/opt/Projects/ENV/local/lib/python2.7/site-packages/django/db/migrations/executor.py",
>  line 115, in migrate
> state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, 
> fake_initial=fake_initial)
>   File 
> "/opt/Projects/ENV/local/lib/python2.7/site-packages/django/db/migrations/executor.py",
>  line 145, in _migrate_all_forwards
> state = self.apply_migration(state, migration, fake=fake, 
> fake_initial=fake_initial)
>   File 
> "/opt/Projects/ENV/local/lib/python2.7/site-packages/django/db/migrations/executor.py",
>  line 244, in apply_migration
> state = migration.apply(state, schema_editor)
>   File 
> "/opt/Projects/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 
> "/opt/Projects/ENV/local/lib/python2.7/site-packages/django/db/migrations/operations/special.py",
>  line 108, in database_forwards
> self._run_sql(schema_editor, self.sql)
>   File 
> "/opt/Projects/ENV/local/lib/python2.7/site-packages/django/db/migrations/operations/special.py",
>  line 133, in _run_sql
> schema_editor.execute(statement, params=None)
>   File 
> "/opt/Projects/ENV/local/lib/python2.7/site-packages/django/db/backends/base/schema.py",
>  line 136, in execute
> cursor.execute(sql, params)
>   File 
> "/opt/Projects/ENV/local/lib/python2.7/site-packages/django/db/backends/utils.py",
>  line 79, in execute
> return super(CursorDebugWrapper, self).execute(sql, params)
>   File 
> "/opt/Projects/ENV/local/lib/python2.7/site-packages/django/db/backends/utils.py",
>  line 64, in execute
> return self.cursor.execute(sql, params)
>   File 
> "/opt/Projects/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 
> "/opt/Projects/ENV/local/lib/python2.7/site-packages/django/db/backends/utils.py",
>  line 62, in execute
> return self.cursor.execute(sql)
> django.db.utils.IntegrityError: null value in column "config" violates 
> not-null constraint
> DETAIL:  Failing row contains (ccbd1537-ac5e-11e6-84a5-026d961c88e6, People 
> and Organizations, This resource model describes actor resources such as 
> individual..., null,  GCI, null, , t, t, fa fa-user, Describes resources such 
> as individual people and groups of peop..., 
> e6e8db47-2ccf-11e6-927e-b8f6b115d7dd, rgba(233,112,111,0.8), null, null, 
> 5000----0001).
> 
> 
> Any help greatly appreciated.
> 
> -- 
> -- 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

[Arches] Arches 4.3.1 released

2018-09-04 Thread Alexei Peters
The Arches team was made aware of a few issues with our latest release 
(4.3.0) so we've quickly fixed them and pushed a 4.3.1 release.

Some of the highlights:
- Fixes issue preventing users unassigned to the Graph Editor group from 
editing related resources
- Fixes migration for users upgrading Arches with existing report records 
(Thanks to Dale Lloyd for letting us know about this one!)


*Known Issues*

- 3993  - During graph 
creation (adding several nodes in a single session) the browser may crash 
or hang.  This is because the Knockout.js Mapping package that Arches uses 
consumes an unnecessarily large amount of memory.  

  *Workaround*: During heavy graph development users can periodically 
refresh the browser to reclaim memory and reduce the occurrence of browser 
issues.

- 4044  - Exporting 
data that uses the File-list datatype in csv format can't be successfully 
re-imported.  

  *Workaround*: If users need to export data that uses the File-list 
datatype, then they should export in JSON format instead, so that data can 
be successfully re-imported.


*Upgrading Arches*

Users are encouraged to update at their earliest convenience.  Completely 
re-installing Arches is the easiest way to accomplish this.

If you can't completely re-install Arches (because you have data in the 
system that you want to preserve) then you'll need to upgrade by running 
the following commands in your activated virtual environment:

pip install arches --upgrade --no-binary :all:
pip uninstall pycryptodome, rdflib-jsonld
pip install pycryptodome django-oauth-toolkit==1.1.2 PyLD[requests]==1.0.3 
pyprind==2.11.2


python manage.py migrate
python manage.py es delete_indexes
python manage.py es setup_indexes
python manage.py es index_database


If you have Arches running on a web server such as Apache, be sure to 
update your static files directory and restart your web server.

As always the documentation can be found at http://arches.readthedocs.io


*Upgrading an Arches project*

If you are upgrading your project from 4.1.1, you should review the project 
upgrade 
steps from 4.1.1 to 4.2 

 before 
proceeding.

If you have made no changes to the package.json file in your project you 
can run :

1. In a terminal cd to your project directory and run the following 
command::

python manage.py updateproject

This command adds the `package.json` and `.yarnrc` files to your 
project and then runs `yarn install`.

2. If you have made changes to `package.json`, then you should update your 
javascript dependencies manually:

cd into your project's root directory (where yarn.lock is located) and 
run the following:
yarn add core-js@2.5.7
yarn add dom4@2.0.1
yarn install
yarn upgrade mapbox-gl@0.48.0
yarn upgrade underscore@1.9.1


*Changes*

- Fixes issue preventing users unassigned to the Graph Editor group 
from editing related resources
- Fixes migration for users upgrading Arches with existing report 
records

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