I’m currently receiving user input through `model ...
# ask-community
k
I’m currently receiving user input through
model = Parameter('model_name')
. I want to announce the user input in Slack via my state handler, but when I do it displays as
<Parameter: model_name>
rather than the actual user input. Does anyone have any suggestions on what I can do to display the user input?
k
Try
prefect.context.parameters["model_name"]
upvote 1
k
I got this error
AttributeError: 'Context' object has no attribute 'parameters'
🤔
k
That seems like it’s being evaluated immediately. How are you using the state handler?
k
Oo I see, I actually tried to print
prefect.context.parameters["model_name"]
directly in the flow, I’ll remove it and try again.
k
Ah the Flow block is not deferred
k
Awesome, that worked, thank you very much!!!
If I wanted to check if the user input was null, I can’t do that in the Flow right? It needs to be its own task?
k
Yes but we also have the
case
task to check the value of a task
k
Got it, thanks!