archivematica / Issues

Issues repository for the Archivematica project
GNU Affero General Public License v3.0
16 stars 1 forks source link

Problem: restructureBagForComplianceFileUUIDsAssigned needs to create intermediate directories for Zipped bag transfers #220

Closed helrond closed 5 years ago

helrond commented 5 years ago

Expected behaviour A valid Zipped bag transfer is uploaded and processed successfully through Transfer and Ingest microservices.

Current behaviour A valid Zipped bag transfer fails at the Approve Transfer microservice in the Verify bag, and restructure for compliance step. Failure report produces the following stderr:

[Errno 2] No such file or directory: '/var/archivematica/sharedDirectory/currentlyProcessing/b4f4faa1-1d82-47e5-93c0-678593b87d38-0cd29bb9-12f6-48e7-a1c0-cfdd91990c84/logs/BagIt'Traceback (most recent call last):
  File "/src/MCPClient/lib/job.py", line 102, in JobContext
    yield
  File "/src/MCPClient/lib/clientScripts/verify_and_restructure_transfer_bag.py", line 101, in call
    restructureBagForComplianceFileUUIDsAssigned(job, target, transferUUID)
  File "/src/MCPClient/lib/clientScripts/verify_and_restructure_transfer_bag.py", line 60, in restructureBagForComplianceFileUUIDsAssigned
    os.mkdir(dirPath)
OSError: [Errno 2] No such file or directory: '/var/archivematica/sharedDirectory/currentlyProcessing/b4f4faa1-1d82-47e5-93c0-678593b87d38-0cd29bb9-12f6-48e7-a1c0-cfdd91990c84/logs/BagIt'

A pull request addressing this (os.mkdir() should be os.makedirs()) will be coming shortly.

Steps to reproduce Select Zipped bag transfer and upload BagTransfer.zip from the Archivematica sample data set.

Your environment (version of Archivematica, OS version, etc) Archivematica 1.8 (qa 1.x) running in docker-compose Mac OS High Sierra


For Artefactual use: Please make sure these steps are taken before moving this issue from Review to Verified in Waffle:

sromkey commented 5 years ago

This is working fine now, thanks @helrond ! Moving to verified.