HaroldMills / Vesper

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

Could not find recorder #183

Closed RichardLitt closed 3 years ago

RichardLitt commented 3 years ago

This is probably more of a user support issue than a bug, but Vesper couldn't find the recorder for me recently. I don't think I changed anything in this archive, so I am rather confused by this. I'm still on 0.4.8.

Log:

2021-05-19 04:50:51,579 WARNING  From /Users/richard/miniconda3/envs/vesper-0.4.8/lib/python3.6/site-packages/vesper/mpg_ranch/nfc_coarse_classifier_3_0/dataset_utils.py:25: The name tf.FixedLenFeature is deprecated. Please use tf.io.FixedLenFeature instead.

2021-05-19 04:50:52,361 INFO     Job started for command "import" with arguments:
2021-05-19 04:50:52,361 INFO         {
2021-05-19 04:50:52,361 INFO             "importer": {
2021-05-19 04:50:52,361 INFO                 "name": "Recording Importer",
2021-05-19 04:50:52,361 INFO                 "arguments": {
2021-05-19 04:50:52,361 INFO                     "paths": [
2021-05-19 04:50:52,361 INFO                         "/Volumes/Erebus/msgr-vesper-archive/Recordings"
2021-05-19 04:50:52,361 INFO                     ],
2021-05-19 04:50:52,361 INFO                     "recursive": false,
2021-05-19 04:50:52,361 INFO                     "recording_file_parser": {
2021-05-19 04:50:52,361 INFO                         "name": "MPG Ranch Recording File Parser",
2021-05-19 04:50:52,361 INFO                         "arguments": {
2021-05-19 04:50:52,361 INFO                             "station_name_aliases_preset": "Station Name Aliases"
2021-05-19 04:50:52,361 INFO                         }
2021-05-19 04:50:52,361 INFO                     }
2021-05-19 04:50:52,362 INFO                 }
2021-05-19 04:50:52,362 INFO             }
2021-05-19 04:50:52,362 INFO         }
2021-05-19 04:50:52,713 ERROR    Recording import failed with an exception.
The exception message was:
    Could not find recorder for recording file "/Volumes/Erebus/msgr-vesper-archive/Recordings/MSGR_2021-01-12_23.04.00_Z.wav".
The archive was not modified.
See below for exception traceback.
2021-05-19 04:50:52,719 ERROR    Job failed with an exception. See traceback below.
Traceback (most recent call last):
  File "/Users/richard/miniconda3/envs/vesper-0.4.8/lib/python3.6/site-packages/vesper/command/job_runner.py", line 145, in run_job
    complete = command.execute(info)
  File "/Users/richard/miniconda3/envs/vesper-0.4.8/lib/python3.6/site-packages/vesper/command/import_command.py", line 22, in execute
    return self._importer.execute(context)
  File "/Users/richard/miniconda3/envs/vesper-0.4.8/lib/python3.6/site-packages/vesper/command/recording_importer.py", line 57, in execute
    recordings = self._get_recordings()
  File "/Users/richard/miniconda3/envs/vesper-0.4.8/lib/python3.6/site-packages/vesper/command/recording_importer.py", line 84, in _get_recordings
    self._get_path_recording_files(path) for path in self.paths))
  File "/Users/richard/miniconda3/envs/vesper-0.4.8/lib/python3.6/site-packages/vesper/command/recording_importer.py", line 84, in <genexpr>
    self._get_path_recording_files(path) for path in self.paths))
  File "/Users/richard/miniconda3/envs/vesper-0.4.8/lib/python3.6/site-packages/vesper/command/recording_importer.py", line 91, in _get_path_recording_files
    return self._get_dir_recording_files(path)
  File "/Users/richard/miniconda3/envs/vesper-0.4.8/lib/python3.6/site-packages/vesper/command/recording_importer.py", line 106, in _get_dir_recording_files
    file = self._get_recording_file(Path(file_path))
  File "/Users/richard/miniconda3/envs/vesper-0.4.8/lib/python3.6/site-packages/vesper/command/recording_importer.py", line 125, in _get_recording_file
    file = self._parse_recording_file(abs_path)
  File "/Users/richard/miniconda3/envs/vesper-0.4.8/lib/python3.6/site-packages/vesper/command/recording_importer.py", line 200, in _parse_recording_file
    file.recorder = _get_recorder(file)
  File "/Users/richard/miniconda3/envs/vesper-0.4.8/lib/python3.6/site-packages/vesper/command/recording_importer.py", line 342, in _get_recorder
    file.path))
vesper.command.command.CommandExecutionError: Could not find recorder for recording file "/Volumes/Erebus/msgr-vesper-archive/Recordings/MSGR_2021-01-12_23.04.00_Z.wav".
HaroldMills commented 3 years ago

I can think of a couple of things that might cause this. One is that the time intervals specified for your archive's device connections may not include the time interval of the recording you are trying to import. If so, you can fix the problem by editing the relevant device connection with the Django admin interface, at 127.0.0.1:8000/admin, and, say, extending the connection's time interval. Another is if the string "MSGR" is an abbreviation for a longer station name that's in your archive database, but your station name aliases preset does not map "MPGR" to the longer name. If that's the case, you can edit the preset in a text editor to map the longer station name to the abbreviation. In either case, be sure to restart the Vesper server after making your edits.

I plan to simplify the way Vesper handles devices and recording imports for Vesper 0.5.0, due later this year. One of the main goals of the changes will be to reduce the number of configuration issues that users encounter, both when creating an archive and (as in your case) when using one across multiple years.

RichardLitt commented 3 years ago

I think you're right about the time intervals! Changing it in the admin interface fixed the problem. Thank you, Harold. Might be good to add that to the warning?

HaroldMills commented 3 years ago

I'm inclined to close this issue since you found the source of the problem. Is that okay with you?

RichardLitt commented 3 years ago

Works for me. Thanks, Harold.