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

cannot find str2bool module used in main.py #22

Open
mayurkaloge opened this issue May 27, 2024 · 1 comment
Open

cannot find str2bool module used in main.py #22

mayurkaloge opened this issue May 27, 2024 · 1 comment

Comments

@mayurkaloge
Copy link

I have installed this project with python3.10 but when trying to run...I couldn't find reference to str2bool library used in main.py
please help to find the reference.
Thanks!

@Aalisha
Copy link

Aalisha commented Jun 11, 2024

Hi,

You can use the below code snippet instead and it would work as expected. Thanks! :)

#from utils import  #str2bool

def str2bool(v):
    if isinstance(v, bool):
        return v
    if v.lower() in ("yes", "true", "t", "y", "1"):
        return True
    if v.lower() in ("no", "false", "f", "n", "0"):
        return False
    raise argparse.ArgumentTypeError("Boolean value expected.")

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

2 participants