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

URLInput is not an allowed input element #101

Closed
MaartenStaa opened this issue Nov 11, 2024 · 1 comment
Closed

URLInput is not an allowed input element #101

MaartenStaa opened this issue Nov 11, 2024 · 1 comment

Comments

@MaartenStaa
Copy link

When constructing an InputBlock with an element of type URLInput, an InvalidUsageError is raised:

from slackblocks import URLInput, InputBlock

block = InputBlock(
    label="My label",
    element=URLInput(
        action_id="some-action", placeholder="Enter a URL"
    ),
)
  File ".venv/lib/python3.12/site-packages/slackblocks/blocks.py", line 338, in __init__
    raise InvalidUsageError("")
slackblocks.errors.InvalidUsageError

It seems URLInput is missing in the list of ALLOWED_INPUT_ELEMENTS in slackblocks/blocks.py. Additionally, a better error message here would be great.

@nicklambourne
Copy link
Owner

Fixed in v1.0.12, thanks for letting me know! https://pypi.org/project/slackblocks/1.0.12/

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