Git Product home page Git Product logo

Comments (9)

cbalantic avatar cbalantic commented on May 28, 2024

Should be fixed with this: 7d05a35

from nsnsdacoustics.

yinbingge avatar yinbingge commented on May 28, 2024

Thank you for quickly fixing.

I updated the latest codes. But I got a new problem. The audio files are generated as the suggestion in the documents. And the python is 3.8.0 and Numpy is 1.20

birdnet_analyzer(audio.directory = 'C:/Users/xxxxx/Documents/example-audio-directory',

  •              results.directory = 'C:/Users/xxxxx/Documents/example-results-directory',
    
  •              birdnet.directory = 'C:/Program Files/BirdNET-Analyzer-main',
    
  •              use.week=TRUE,
    
  •              lat = 46.09924,
    
  •              lon = -123.8765)
    

Working on 1 of 2: Rivendell_20210623_113602.wav

There is a problem with Rivendell_20210623_113602.wav; skipping to next

Working on 2 of 2: Rivendell_20210623_114602.wav

There is a problem with Rivendell_20210623_114602.wav; skipping to next

2 files could not be processed. Possible reasons: there is an issue with the audio file itself (corrupt, too short), a txt or csv file with the same name was open at the time of running the function, you are processing audio data from an external hard drive and there is an issue with response, or there is an error in your BirdNET -> Python -> Reticulate setup.
See list of unprocessed files here: C:/Users/yinge/Documents/example-results-directory/BirdNET_Problem-Files_example-audio-directory_2022-11-07 135627.csv

Returning error list...

ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  • The Python version is: Python3.8 from "C:/Users/yinge/.conda/envs/pybirdanalyze/python.exe"
  • The NumPy version is: "1.20.3"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: DLL load failed while importing _multiarray_umath: The specified module could not be found.

py_run_file_impl(file, local, convert)

FINISHED! Results for each audio file are saved in C:/Users/xxxx/Documents/example-results-directory/ with the suffix .BirdNET.results.csv

from nsnsdacoustics.

cbalantic avatar cbalantic commented on May 28, 2024

Based on that "ImportError" message (which comes from Python) it looks like the issue is with the numpy version. Numpy should be 1.20, but this error seems to suggest you are running 1.20.3. Dealing with Python's dependencies is definitely a pain, and it will be nearly impossible for me to diagnose issues with the Python setup, unfortunately.

What you can try as an alternative is to see if you can get BirdNET to run from the command line, rather than via birdnet_analyzer(). (This may be preferable anyway since you'll be able to specify the number of threads and process files faster.)

If you want to try running from command line, and you're on a Windows machine, you'd find those instructions here: https://github.com/kahst/BirdNET-Analyzer#setup-windows ==> skip the first part and scroll down to "For more advanced use cases (e.g., hosting your own API server), follow these steps to set up BirdNET-Analyzer on your Windows machine:" and follow directions from there based on your preferences. Then, you'll look at the examples under "Usage" and see if you can run any of those examples from the command prompt.

I'm sorry I can't be more helpful!

Edited to add: if you ARE successful in running BirdNET from the command line, note that you can still use the R functions in NSNSDAcoustics for gathering and visualizing BirdNET results, but you'll just need to make sure you specified --rtype "r" in your command line input.

from nsnsdacoustics.

yinbingge avatar yinbingge commented on May 28, 2024

Thank for your information. Yes. the command line do work. It will be nice if this could work at R studio.

from nsnsdacoustics.

cbalantic avatar cbalantic commented on May 28, 2024

It's great the command line works. I wish I could help, but I'm not able to reproduce the issue. Your code looks correct. What is your output when you run: py_config() ?

from nsnsdacoustics.

yinbingge avatar yinbingge commented on May 28, 2024

py_config()
python: C:/Users/xxxxx/.conda/envs/pybirdanalyze/python.exe
libpython: C:/Users/xxxx/.conda/envs/pybirdanalyze/python38.dll
pythonhome: C:/Users/xxxx/.conda/envs/pybirdanalyze
version: 3.8.0 (default, Nov 6 2019, 16:00:02) [MSC v.1916 64 bit (AMD64)]
Architecture: 64bit
numpy: C:/Users/xxxx/.conda/envs/pybirdanalyze/Lib/site-packages/numpy
numpy_version: 1.20.3

NOTE: Python version was forced by RETICULATE_PYTHON

from nsnsdacoustics.

cbalantic avatar cbalantic commented on May 28, 2024

Thanks. It looks a little different than mine (below), although numpy version is the same so we can probably rule that out. I am running this on Windows, and won't have any insight outside of that environment. I also noticed that your py_config() is pointing to a '.conda' folder, whereas mine points to an Anaconda3 folder. It looks like you are running an older installation of Anaconda (?) (and python, although 3.8 should be fine for BirdNET?), which could be another place to look for the issue? I'm not sure.

py_config()
python: C:/Users/xxxxx/Anaconda3/envs/pybirdanalyze/python.exe
libpython: C:/Users/xxxxx/Anaconda3/envs/pybirdanalyze/python39.dll
pythonhome: C:/Users/xxxxx/Anaconda3/envs/pybirdanalyze
version: 3.9.12 | packaged by conda-forge | (main, Mar 24 2022, 23:17:03) [MSC v.1929 64 bit (AMD64)]
Architecture: 64bit
numpy: C:/Users/xxxxx/Anaconda3/envs/pybirdanalyze/Lib/site-packages/numpy
numpy_version: 1.20.3

NOTE: Python version was forced by use_python function

from nsnsdacoustics.

yinbingge avatar yinbingge commented on May 28, 2024

We have all re-installed and set up the proper permission for the pybirdanalyze folder. Everything is running well now.
Thank you! Cathleen!

from nsnsdacoustics.

cbalantic avatar cbalantic commented on May 28, 2024

Hooray! Best of luck and hope it's useful.

from nsnsdacoustics.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.