Hi Joshua,

I'm assuming that you pulled the latest but haven't run the migrations
associated with the update.
I'm guessing that you don't have the latest db migrations.  From the django
docs: "Migrations are Django’s way of propagating changes you make to your
models (adding a field, deleting a model, etc.) into your database schema."
To load any un-applied migrations run the following command in an activated
virtual environment:

python manage.py migrate

After running that command you should see the "identifier" valuetype show
up in the database.

Cheers,
Alexei


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

On Tue, Nov 21, 2017 at 8:52 AM, Joshua Gomez <joshuag...@gmail.com> wrote:

> I am trying to load a thesaurus file into Arches and getting the following
> error:
>
> (ENV) bash-4.2$ python manage.py packages -o import_reference_data -s
> ~/29bf48a2-c47c-4f9d-b093-f742b20bfaf7.xml
> operation: import_reference_data
> package: arches
> time elapsed to parse rdf graph 0.114490032196 s
> Traceback (most recent call last):
>   File "manage.py", line 27, in <module>
>     execute_from_command_line(sys.argv)
>   File 
> "/apps/arches/ENV/lib/python2.7/site-packages/django/core/management/__init__.py",
> line 353, in execute_from_command_line
>     utility.execute()
>   File 
> "/apps/arches/ENV/lib/python2.7/site-packages/django/core/management/__init__.py",
> line 345, in execute
>     self.fetch_command(subcommand).run_from_argv(self.argv)
>   File 
> "/apps/arches/ENV/lib/python2.7/site-packages/django/core/management/base.py",
> line 348, in run_from_argv
>     self.execute(*args, **cmd_options)
>   File 
> "/apps/arches/ENV/lib/python2.7/site-packages/django/core/management/base.py",
> line 399, in execute
>     output = self.handle(*args, **options)
>   File "/apps/arches/arches/management/commands/packages.py", line 163,
> in handle
>     self.import_reference_data(options['source'], options['overwrite'],
> options['stage'])
>   File "/apps/arches/arches/management/commands/packages.py", line 713,
> in import_reference_data
>     ret = skos.save_concepts_from_skos(rdf, overwrite, stage)
>   File "/apps/arches/arches/app/utils/skos.py", line 78, in
> save_concepts_from_skos
>     *dcterms_identifier_type =
> dcterms_value_types.get(valuetype=str(DCTERMS.identifier).replace(str(DCTERMS),
> ''))*
>   File 
> "/apps/arches/ENV/lib/python2.7/site-packages/django/db/models/query.py",
> line 387, in get
>     self.model._meta.object_name
> arches.app.models.models.DoesNotExist: DValueType matching query does not
> exist.
>
> When I look at the data in the DB, I see that there is indeed no dcterms
> identifier valuetype listed:
>
> arches=# select * from d_value_types;
>    valuetype   | category  | description | namespace | datatype
> ---------------+-----------+-------------+-----------+----------
>  scopeNote     | note      |             | skos      | text
>  definition    | note      |             | skos      | text
>  example       | note      |             | skos      | text
>  historyNote   | note      |             | skos      | text
>  editorialNote | note      |             | skos      | text
>  changeNote    | note      |             | skos      | text
>  note          | note      |             | skos      |
>  prefLabel     | label     |             | skos      | text
>  altLabel      | label     |             | skos      | text
>  hiddenLabel   | label     |             | skos      | text
>  notation      | notation  |             | skos      | text
>  image         | image     |             | arches    | text
>  *title         | label     |             | dcterms   | text*
> * description   | note      |             | dcterms   | text*
>  collector     | undefined |             | arches    | text
>  sortorder     | undefined |             | arches    | text
>  min_year      | undefined |             | arches    | text
>  max_year      | undefined |             | arches    | text
> (18 rows)
>
> So, my questions are:
>  - Where do those valuetypes come from for a new instance of Arches?
>  - And what is the best way to update them with the ones I am missing?
>
> Thanks,
> Joshua Gomez
> Getty Research Institute
>
>
>
> --
> -- 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.

Reply via email to