denshoproject / ddr-local

Web UI used for interacting with DDR collections and entities on a local machine.
Other
3 stars 0 forks source link

GitCommandError during collection creation #322

Closed gjost closed 1 year ago

gjost commented 1 year ago

User tried to manually create ddr-densho-490 on ddreditor using local VM v5.6.1_HQMA and it failed.

Traceback (most recent call last):
  File "/opt/ddr-local/venv/ddrlocal/lib/python3.9/site-packages/celery/app/trace.py", line 543, in trace_task
    task_after_return(
  File "/opt/ddr-local/ddrlocal/webui/tasks/collection.py", line 120, in after_return
    collection_id = retval['collection_id']
TypeError: 'GitCommandError' object is not subscriptable

The collection was not created:

Request Method: GET
Request URL: http://192.168.56.101/ui/collection/ddr-densho-490/
Traceback (most recent call last):
  File "/opt/ddr-local/venv/ddrlocal/lib/python3.9/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/opt/ddr-local/venv/ddrlocal/lib/python3.9/site-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/ddr-local/ddrlocal/storage/decorators.py", line 83, in inner
    return func(request, *args, **kwargs)
  File "/opt/ddr-local/ddrlocal/webui/views/collections.py", line 90, in detail
    collection = Collection.from_identifier(Identifier(cid))
  File "/opt/ddr-local/ddrlocal/webui/models.py", line 440, in from_identifier
    return from_json(Collection, identifier.path_abs('json'), identifier)
  File "/opt/ddr-local/venv/ddrlocal/lib/python3.9/site-packages/ddr_cmdln-5.6.1-py3.9.egg/DDR/models/common.py", line 822, in from_json
    document.load_json(fileio.read_text(json_path))
  File "/opt/ddr-local/venv/ddrlocal/lib/python3.9/site-packages/ddr_cmdln-5.6.1-py3.9.egg/DDR/fileio.py", line 16, in read_text
    raise IOError('File is missing or unreadable: %s' % path)

Exception Type: OSError at /ui/collection/ddr-densho-490/
Exception Value: File is missing or unreadable: /var/www/media/ddr/ddr-densho-490/collection.json
gjost commented 1 year ago

Unable to duplicate in local dev environment. Event happened at 2023-02-08 12:14:12 -0800. Check those logs...

gjost commented 1 year ago

Does not seem to have reoccurred, closing.