-
Notifications
You must be signed in to change notification settings - Fork 30
Kestra task output method - Python boolean not rendered properly #191
Copy link
Copy link
Labels
area/pluginPlugin-related issue or feature requestPlugin-related issue or feature request
Description
Describe the issue
Came from this #help message : https://kestra-io.slack.com/archives/C03FQKXRK3K/p1733159976009429
Context
I have a python script task that basically ends with :
results = {
'domain': domain,
'keywords': keywords,
'description': description,
'scraping_successful': scraped_data is not None,
'scraped_content': scraped_data
}
logger.info(results)
# output data for the next task
Kestra.outputs(results)
And while trying to access {{outputs.scrape_website.vars.results}}, it ended up as NameError: name 'true' is not defined. Did you mean: 'True'
Discussion with @Ben8t ; it looks like it should have been the case.
PS : More code context in the slack thread if needed
I found a quick patch going through a json string instead to pass those parameters.
Kestra.outputs({"results": json.dumps(results)})
And getting the var using :
input = {{ outputs.scrape_website["vars"] }}
data = json.loads(input['results'])
logger.info(data)
Environment
- Kestra Version: latest
- TaskRunner : Process
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/pluginPlugin-related issue or feature requestPlugin-related issue or feature request
Type
Fields
Give feedbackNo fields configured for Bug.