denshoproject / ddr-cmdln

Command-line tools for automating the Densho Digital Repository's various processes.
Other
0 stars 2 forks source link

Error when posting Entity to Elasticsearch after file upload #53

Closed gjost closed 6 years ago

gjost commented 6 years ago

Binary files are uploaded but the page fails with a 55 error.

Phillip

Traceback (most recent call last):
  File "/opt/ddr-local/venv/ddrlocal/local/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/opt/ddr-local/venv/ddrlocal/local/lib/python2.7/site-packages/celery/app/trace.py", line 438, in __protected_call__
    return self.run(*args, **kwargs)
  File "/opt/ddr-local/ddrlocal/webui/tasks.py", line 292, in entity_add_file
    result = file_.post_json()
  File "/opt/ddr-local/venv/ddrlocal/local/lib/python2.7/site-packages/ddr_cmdln-0.9.4b0-py2.7.egg/DDR/models/__init__.py", line 2467, in post_json
    'entity_id': self.parent_id,
  File "/opt/ddr-local/venv/ddrlocal/local/lib/python2.7/site-packages/ddr_cmdln-0.9.4b0-py2.7.egg/DDR/docstore.py", line 536, in post
    ES_Class = ELASTICSEARCH_CLASSES_BY_MODEL[document.identifier.model]
AttributeError: 'list' object has no attribute 'identifier'
gjost commented 6 years ago

Does this traceback come from the background tasks page?

gjost commented 6 years ago

Looks like this is the app failing to post Entity data to Elasticsearch after a successful file upload.

gjost commented 6 years ago

This was fixed in VERSION 2.1.5, mostly on the ddr-local side.