BirdVox / birdvoxdetect

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

TypeError: cannot unpack non-iterable NoneType object #82

Closed lostanlen closed 3 years ago

lostanlen commented 3 years ago

Arose in a WAV file by Phil Taylor

 python3 -m birdvoxdetect --predict-proba --export-logger -t 10 CopyOfSTJO_45.1679_-66.1796_2020-09-24-22-46-48.wav -v

Logger:

birdvoxdetect: Processing: /Users/vl238/tmp/CopyOfSTJO_45.1679_-66.1796_2020-09-24-22-46-48.wav
285/285 [==============================] - 35s 123ms/step
285/285 [==============================] - 36s 127ms/step

...

285/285 [==============================] - 33s 116ms/step
285/285 [==============================] - 30s 105ms/step
Traceback (most recent call last):
  File "/Users/vl238/miniconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/Users/vl238/miniconda3/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/vl238/miniconda3/lib/python3.7/site-packages/birdvoxdetect/__main__.py", line 7, in <module>
    main()
  File "/Users/vl238/miniconda3/lib/python3.7/site-packages/birdvoxdetect/cli.py", line 260, in main
    logger_level=logger_level,
  File "/Users/vl238/miniconda3/lib/python3.7/site-packages/birdvoxdetect/cli.py", line 96, in run
    threshold=threshold,
  File "/Users/vl238/miniconda3/lib/python3.7/site-packages/birdvoxdetect/core.py", line 641, in process_file
    classifier, chunk_pcen, th_peak_loc, taxonomy)
TypeError: cannot unpack non-iterable NoneType object
lostanlen commented 3 years ago

Caused by line 1054 in core.py

    # If PCEN clip is empty, return None
    if pcen_clip.shape[1] == 0:
        return None