BirdNET icon indicating copy to clipboard operation
BirdNET copied to clipboard

ValueError: could not convert string to float: '5.826450433232822e'

Open lostanlen opened this issue 4 years ago • 0 comments

Hello @kahst, i am encountering an issue when running BirdNET on 2-hour WAV files, with a high overlap (2.9 seconds).

Here's my use case:

python analyze.py --i /scratch/vl1019/BirdVox-300h/BirdVox-300h_wav/2015-10-02_02-00-00_unit05.wav --o /scratch/vl1019/BirdVox-300h/BirdVox-300h_BirdNET --lat 42.38 --lon -76.49 --week 37 --overlap 2.9 --min_conf 0.01

and the traceback:

LOADING eBIRD GRID DATA... DONE! 13800 GRID CELLS 
SID: 1 PROCESSING: 2015-09-25_04-00-00_unit10.wav SPECIES: 101 Traceback (most recent call last):
  File "analyze.py", line 292, in <module>
    main()
  File "analyze.py", line 288, in main
    process(s, dataset.index(s) + 1, result_path, args.results, test_function)
  File "analyze.py", line 222, in process
    stable, dcnt = getRavenSelectionTable(p, soundscape.split(os.sep)[-1])
  File "analyze.py", line 114, in getRavenSelectionTable
    start, end = decodeTimestamp(timestamp)
  File "analyze.py", line 85, in decodeTimestamp
    end_seconds = float(end[0]) * 3600 + float(end[1]) * 60 + float(end[2])
ValueError: could not convert string to float: '5.826450433232822e'

It looks like timestamps get encoded in scientific notation. Perhaps they are infinitesimally small due to the high overlap? If so, it would be good to raise an exception ahead of analysis.

lostanlen avatar Mar 30 '21 13:03 lostanlen