Question, I'm trying to debug one of my functions ...
# ask-community
j
Question, I'm trying to debug one of my functions that I've decorated with the task decorator, but I have the below error. I try to call the task with
task.fn(function_to_call())
but that doesn't work as I get this error:
AttributeError: 'function' object has no attribute 'fn'
`RuntimeError: Tasks cannot be run outside of a flow. To call the underlying task function outside of a flow use
task.fn()
.`
1
Any tips on how to run tasks outside of flows to debug?
I can just remove the decorator, but seems like a way for me to forget to add back in
n
It should be
function_to_call.fn()
🙏 1
🙌 3
task is just a placeholder for your task function name
j
@Nico Neumann OH! Thanks!