mirror of
https://github.com/macaodha/batdetect2.git
synced 2025-06-29 14:41:58 +02:00
Added the EOFError to the list of expected errors when processing files
This commit is contained in:
parent
1a11174bc4
commit
69f59ff559
@ -1,4 +1,5 @@
|
|||||||
"""BatDetect2 command line interface."""
|
"""BatDetect2 command line interface."""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import click
|
import click
|
||||||
@ -129,10 +130,9 @@ def detect(
|
|||||||
):
|
):
|
||||||
results_path = audio_file.replace(audio_dir, ann_dir)
|
results_path = audio_file.replace(audio_dir, ann_dir)
|
||||||
save_results_to_file(results, results_path)
|
save_results_to_file(results, results_path)
|
||||||
except (RuntimeError, ValueError, LookupError) as err:
|
except (RuntimeError, ValueError, LookupError, EOFError) as err:
|
||||||
error_files.append(audio_file)
|
error_files.append(audio_file)
|
||||||
click.secho(f"Error processing file!: {err}", fg="red")
|
click.secho(f"Error processing file {audio_file}: {err}", fg="red")
|
||||||
raise err
|
|
||||||
|
|
||||||
click.echo(f"\nResults saved to: {ann_dir}")
|
click.echo(f"\nResults saved to: {ann_dir}")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user