BirdVox / birdvoxdetect

A pre-trained deep learning system for detecting bird flight calls in continuous recordings
MIT License
76 stars 15 forks source link

KeyError: 'Species (4-letter code)' when printing checklist count #76

Closed lostanlen closed 3 years ago

lostanlen commented 3 years ago

Reported by Phil Taylor

I've put this file and other information in the same directory ... a late season (16 November 2020) file with probably no birds ... interestingly the checklist file doesn't output any species classification data ...

Again, the logger file has no data (I'll check tomorrow if I'm doing something wrong there ...

Here is the cmd I'm sending:

"python3 -m birdvoxdetect --predict-proba --export-logger /data/nbwind/audio2020final/StJohn/ForProcessing// -t 10"

Error txt:

birdvoxdetect: Processing: /data/nbwind/audio2020final/StJohn/ForProcessing//STJO45.1679-66.1796_2020-11-16-21-25-53.wav Traceback (most recent call last): File "/home/phil/.local/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 2891, in get_loc return self._engine.get_loc(casted_key) File "pandas/_libs/index.pyx", line 70, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/index.pyx", line 101, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/hashtable_class_helper.pxi", line 1675, in pandas._libs.hashtable.PyObjectHashTable.get_item File "pandas/_libs/hashtable_class_helper.pxi", line 1683, in pandas._libs.hashtable.PyObjectHashTable.get_item KeyError: 'Species (4-letter code)'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/usr/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/usr/local/lib/python3.7/dist-packages/birdvoxdetect/main.py", line 7, in main() File "/usr/local/lib/python3.7/dist-packages/birdvoxdetect/cli.py", line 260, in main logger_level=logger_level, File "/usr/local/lib/python3.7/dist-packages/birdvoxdetect/cli.py", line 96, in run threshold=threshold, File "/usr/local/lib/python3.7/dist-packages/birdvoxdetect/core.py", line 994, in process_file df["Species (4-letter code)"] File "/home/phil/.local/lib/python3.7/site-packages/pandas/core/frame.py", line 2902, in getitem indexer = self.columns.get_loc(key) File "/home/phil/.local/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 2893, in get_loc raise KeyError(key) from err KeyError: 'Species (4-letter code)' [Process completed] [Exit code: 1] Phil Taylor Acadia University, Wolfville, NS.

lostanlen commented 3 years ago

triaged for 0.4.1