denshoproject / ddr-cmdln

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

OSError when trying to add collection files #117

Closed gjost closed 5 years ago

gjost commented 5 years ago

In at least one ddr-local install, adding a new Entity results in an OSError because the function is mistakenly trying to add collection.json and ead.xml to the repository and those files are not there. Or perhaps CWD is not at the collection root so they don't appear to be there. In any case, they don't need to be added when creating a new Entity.

gjost commented 5 years ago

Django error page from the affected machine. densho-1000newobj.zip

gjost commented 5 years ago

Try this with a segment

gjost commented 5 years ago

In DDR.models.entity.py:new the updated_files arg to DDR.commands.entity_create should be empty. Currently it's

             [collection.json_path_rel, collection.ead_path_rel],

Maybe that function was cut-and-pasted from Collection.new without modifying it for Entity?

The weird thing is that it works on other machines in the HQ.

GeoffFroh commented 5 years ago

The affected repo (ddr-densho-1000) was missing ead.xml at the root; adding the file addressed the issue. Not important to refactor at the present.