Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation instructions need clarification, and config.py and gui.py doesn't work out of the box on Mac #451

Open
aifiks opened this issue Sep 18, 2024 · 2 comments

Comments

@aifiks
Copy link

aifiks commented Sep 18, 2024

At first, I only tried to install the package and was unaware that I had to perform several commands in Terminal before doing this. It should be emphasized before the download links that the Terminal commands must be performed before installing the package.

After some minutes with an AI, I was able to get things to work, but only after adding this to the top of config.py:

from typing import Union

and this to the top of gui.py:

from typing import Optional

and changing line 215 in gui.py to:

output_path: Optional[str],

and changing line 236 in gui.py to:

progress: Optional[gr.Progress],

Then I finally was able to open the GUI from Terminal with the command:

python gui.py

However, the BirdNET-Analyzer-GUI.app still doesn’t open the GUI. I’ve tried putting the app into the trash, emptying the trash, and reinstalling the app several times, but still no joy.

  • OS: MacOS
  • Version 12.7.4
  • Python version 3.10.0
@herobatt
Copy link

For running the docker on Ubuntu, I needed to change the config.py , line 110:
RESULT_TYPES: set[str] | list[str] = {"table"}

The issue was that apparently python 3.9 did not understand the " | " operator ( https://stackoverflow.com/questions/76712720/typeerror-unsupported-operand-types-for-type-and-nonetype )

I got the following error:

TypeError: unsupported operand type(s) for |: 'types.GenericAlias' and 'types.GenericAlias'

I removed set[str] | and it worked.
I am very new to all of this, and can't provide any better contribution than this comment. Cheers.

@Mattk70
Copy link
Contributor

Mattk70 commented Sep 30, 2024

For running the docker on Ubuntu, I needed to change the config.py , line 110: RESULT_TYPES: set[str] | list[str] = {"table"}

The issue was that apparently python 3.9 did not understand the " | " operator ( https://stackoverflow.com/questions/76712720/typeerror-unsupported-operand-types-for-type-and-nonetype )

I got the following error:

TypeError: unsupported operand type(s) for |: 'types.GenericAlias' and 'types.GenericAlias'

I removed set[str] | and it worked. I am very new to all of this, and can't provide any better contribution than this comment. Cheers.

It may work until the results you want are a Set. You must use python 3.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants