BirdVox / birdvoxdetect

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

local variable 'has_sensor_fault' referenced before assignment #34

Closed plaf2000 closed 4 years ago

plaf2000 commented 4 years ago

Hi, I succesfully installed birdvoxdetect by running the pip command, but when I try to scan a wav audiofile I get this Python error:

[...] File "/usr/local/lib/python3.6/dist-packages/birdvoxdetect/core.py", line 497, in process_file if (n_chunks>1) and has_sensor_fault: UnboundLocalError: local variable 'has_sensor_fault' referenced before assignment

Here's the complete --verbose output:

birdvoxdetect: Threshold = 50.0 birdvoxdetect: Processing: /home/plaf2000/Documenti/programmi_audio/test/allo_10min_mono.wav 2020-02-06 22:21:48.396617: E tensorflow/stream_executor/cuda/cuda_driver.cc:318] failed call to cuInit: UNKNOWN ERROR (303) 9109/9109 [==============================] - 19s 2ms/sample Traceback (most recent call last): File "/usr/local/bin/birdvoxdetect", line 8, in sys.exit(main()) File "/usr/local/lib/python3.6/dist-packages/birdvoxdetect/cli.py", line 200, in main logger_level=logger_level) File "/usr/local/lib/python3.6/dist-packages/birdvoxdetect/cli.py", line 89, in run logger_level=logger_level) File "/usr/local/lib/python3.6/dist-packages/birdvoxdetect/core.py", line 497, in process_file if (n_chunks>1) and has_sensor_fault: UnboundLocalError: local variable 'has_sensor_fault' referenced before assignment

I see there's also a problem with the GPU's driver (mine is Intel, which I know doesn't work with CUDA).

I apologize for my inexperience and sorry if my English is not perfect.

Thank you!

lostanlen commented 4 years ago

Hello, is your version 0.2.0 ?

plaf2000 commented 4 years ago

Hello, is your version 0.2.0 ?

Yes

lostanlen commented 4 years ago

@plaf2000 hello, thanks for reporting. I pushed bugfix #39 and released v0.2.2 Please update birdvoxdetect from pip and tell me if the erorr persists.

plaf2000 commented 4 years ago

@lostanlen You're welcome! Now everything seems alright!