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

"File could not be decoded" should be fatal error #59

Open
milahu opened this issue May 17, 2024 · 1 comment
Open

"File could not be decoded" should be fatal error #59

milahu opened this issue May 17, 2024 · 1 comment

Comments

@milahu
Copy link

milahu commented May 17, 2024

im passing mka files with flac codec to audalign.align_files
but it fails to read all files, and finally throws

File "file1.mka" could not be decoded
File "file2.mka" could not be decoded
File "file3.mka" could not be decoded
Fingerprinting file0.mka
Finished fingerprinting file0.mka
File "file1.mka" could not be decoded
file1.mka: Finding Matches...

Traceback (most recent call last):

  File "/nix/store/f3jqdgjm5qapi1rwm07hp7qjdw59w9zf-audalign-1.2.4/lib/python3.11/site-packages/audalign/recognizers/fingerprint/recognize.py", line 127, in find_matches
    for t_hash in target_mapper.keys():
                  ^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'keys'

it also throws when only one file could not be decoded

expected: should throw on the first "File could not be decoded" error
assuming the user wants to process all input files

files 1 2 3 were created by
ffmpeg -i src1.mkv -map 0:a:0 -c flac -ss $start -to $end file$i.mka

files 0 was created by
ffmpeg -i src0.mkv -map 0:a:0 -c flac file0.mka

im passing mka files with flac codec to audalign.align_files

File could not be decoded

fixed by using flac files with flac codec

probably similar issue like #58 - extension != format

@benfmiller
Copy link
Owner

Thanks for the bug report!

I'm thinking of moving the extension settings from the filehandler into the Config and refactoring so that the decoding is configurable. Default to fail_on_decode_error = True? It would be nice to be able to ignore unspecified file decoding errors if desired.

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

2 participants