denshoproject / ddr-cmdln

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

'Entity' object has no attribute '_file_objects' when uploading via webui #137

Closed gjost closed 5 years ago

gjost commented 5 years ago

Error in gitstatus updates when uploading a binary via webui.

Could not upload <b>DDR TestBinary1.tif</b> to <a href="/ui/entity/ddr-testing-40180-1/">ddr-testing-40180-1</a>.<br/>AttributeError("'Entity' object has no attribute '_file_objects'",)
gjost commented 5 years ago

Duplicated this in dev environment. Traceback from tasks page:

Traceback (most recent call last):
  File "/opt/ddr-local-master/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-master/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-develop/ddrlocal/webui/tasks/files.py", line 75, in add_file
    git_name, git_mail, agent
  File "/opt/ddr-local-master/venv/ddrlocal/local/lib/python2.7/site-packages/ddr_cmdln-0.9.4b0-py2.7.egg/DDR/models/entity.py", line 606, in add_local_file
    self, src_path, role, data, git_name, git_mail, agent
  File "/opt/ddr-local-master/venv/ddrlocal/local/lib/python2.7/site-packages/ddr_cmdln-0.9.4b0-py2.7.egg/DDR/ingest.py", line 446, in add_local_file
    entity._file_objects.append(file_)
AttributeError: 'Entity' object has no attribute '_file_objects'
GeoffFroh commented 5 years ago

Related to #139