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

indexbox assertion error if image is clicked #186

Open
tobidelbruck opened this issue Jul 18, 2021 · 0 comments
Open

indexbox assertion error if image is clicked #186

tobidelbruck opened this issue Jul 18, 2021 · 0 comments

Comments

@tobidelbruck
Copy link

indexbox is great, but if an image is specified, an AssertionError is generated by clicking the image, instead of nothing occuring (preferred) or returning None. A hack around this is:

    try:
        track_num = indexbox('What track do you want?', 'Tracks', tracks, image='media/all_tracks.png')
    except AssertionError as e:
        logger.warning(f'caught {e}: You must click one of the buttons, not the image')
        return None

Thanks for awesome project.

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

1 participant