Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with verify_fixity.py when some items are missing md5 sidecar files #5

Open
callyho opened this issue Jul 10, 2019 · 0 comments

Comments

@callyho
Copy link
Contributor

callyho commented Jul 10, 2019

When using the mkv workflow and some mkvs are missing .md5 sidecar files, the script breaks with this error message:

Traceback (most recent call last):
  File "/scripts/GitHub/av-aip/scripts/verify_fixity.py", line 29, in <module>
    move_error('fixity_changed', f'{item}.md5')
  File "/scripts/GitHub/av-aip/scripts/variables.py", line 73, in move_error
    os.replace(item, f'{aip_staging}/aips_with_errors/{error_name}/{item}')
FileNotFoundError: [Errno 2] No such file or directory: '55002cyt.mkv.md5' -> '[nameofraid]AIP_staging/aips_with_errors/fixity_changed/55002cyt.mkv.md5'

This causes the rest of the script to break, because none of the md5 sidecar files or the oldmanifiest.txt is removed from the directory.

Related error: if the md5 sidecar file is blank (happens on occasion), this error happens:

Traceback (most recent call last):
  File "/usr/local/bin/checksumthing", line 11, in <module>
    load_entry_point('Checksumthing==0.0.3', 'console_scripts', 'checksumthing')()
  File "/usr/local/lib/python2.7/site-packages/Checksumthing-0.0.3-py2.7.egg/EGG-INFO/scripts/checksumthing.py", line 82, in main
    old_hash = hashing.read_hash(filepath, hash_length=hash_length)
  File "/usr/local/lib/python2.7/site-packages/Checksumthing-0.0.3-py2.7.egg/Checksumthing/hashing.py", line 30, in read_hash
    return m.group()
AttributeError: 'NoneType' object has no attribute 'group'

I'm not sure if this error freezes the script or just causes the subsequent steps to crash -- didn't make note of the results.

I've also noticed that if none of the mkvs have sidecar files, you just get an error message from checksumthing but the rest of the aip_av.py script runs fine. I created the mkv-filmscan branch to avoid this error message, because film scan mkvs never have sidecar md5s in our current workflow. I need to do more rigorous testing of that patch to make sure it's working correctly.

Adding this issue as a reminder to come fix it when I have time. Workaround is to process mkvs with md5s and mkvs without md5s separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant