HaroldMills / Vesper

Open source software for acoustic monitoring of nocturnal bird migration.
MIT License
55 stars 6 forks source link

Could not find recorder for recording file when importing #223

Closed gongh1 closed 4 months ago

gongh1 commented 7 months ago

Hello! I'm trying to set up Vesper for the first time for an upcoming NFC monitoring project. I've managed to import all the archive metadata, but I'm encountering an error when trying to import files into the archive. I'm recording .wav files on a portable recorder (zoom h5) and I've named them using the UTC date format, but I get this error message below. I'm wondering if it means that it couldn't find information about the recorder in the wav file? Is there supposed to be some metadata containing recorder info in the audio file? Any suggestions appreciated, thanks!

2024-02-25 17:24:31,899 ERROR Job failed with an exception. See traceback below. Traceback (most recent call last): File "/Users/kevingong/miniconda3/envs/vesper-0.4.14/lib/python3.10/site-packages/vesper/command/job_runner.py", line 144, in run_job complete = command.execute(info) File "/Users/kevingong/miniconda3/envs/vesper-0.4.14/lib/python3.10/site-packages/vesper/command/import_command.py", line 22, in execute return self._importer.execute(context) File "/Users/kevingong/miniconda3/envs/vesper-0.4.14/lib/python3.10/site-packages/vesper/command/recording_importer.py", line 58, in execute recordings = self._get_new_recordings() File "/Users/kevingong/miniconda3/envs/vesper-0.4.14/lib/python3.10/site-packages/vesper/command/recording_importer.py", line 81, in _get_new_recordings files = self._get_unimported_disk_files() File "/Users/kevingong/miniconda3/envs/vesper-0.4.14/lib/python3.10/site-packages/vesper/command/recording_importer.py", line 98, in _get_unimported_disk_files file = self._parse_recording_file(info.absolute_path) File "/Users/kevingong/miniconda3/envs/vesper-0.4.14/lib/python3.10/site-packages/vesper/command/recording_importer.py", line 212, in _parse_recording_file file.recorder = _get_recorder(file) File "/Users/kevingong/miniconda3/envs/vesper-0.4.14/lib/python3.10/site-packages/vesper/command/recording_importer.py", line 355, in _get_recorder raise CommandExecutionError( vesper.command.command.CommandExecutionError: Could not find recorder for recording file "/Users/kevingong/Documents/vp/Recordings/gs_2024-02-25_16.55.00_Z.wav".

HaroldMills commented 7 months ago

The idea is that Vesper should be able to figure out which recorder created your .wav file from the file name and the metadata you imported into the Vesper archive. The .wav file doesn't need to contain any information about the recorder. Could you please send the metadata YAML file(s) that you imported into your archive so I can try to reproduce and figure out the problem here?

gongh1 commented 7 months ago

Thanks for the clarification, I must have made a mistake somewhere when editing the recorder or devices sections of the metadata directly in the YAML file. I was able to create a new archive from the provided template without modifying the recorder and microphone, then change the details from the admin interface, and importing works now. I've attached my original metadata just in case (in a zip because YAML file uploads aren't supported), thank you for the help! One Station.yaml.zip

HaroldMills commented 7 months ago

Glad to hear things are working for you now! To try to figure out what went wrong earlier, I created a new archive on my computer, imported the metadata YAML file you sent into it, and tried to import a recording file with the name "gs_2024-02-25_16.55.00_Z.wav". The recording file import worked, so I'm not sure why you weren't able to something similar for your archive. Since you're up and running I'm not inclined to pursue that further, but if you have additional problems please let me know.