Heads up:
We’re moving the GATK website, docs and forum to a new platform. Read the full story and breakdown of key changes on this blog.
Update: July 26, 2019
This section of the forum is now closed; we are working on a new support model for WDL that we will share here shortly. For Cromwell-specific issues, see the Cromwell docs and post questions on Github.

Problem with read_json()

Here is my task:
```
task task__0_rawreads__build {
input {
File config
...
}
Map[String, String] cfg = read_json(config)
```
Error:
```
[2019-02-21 10:15:28,78] [error] WorkflowManagerActor Workflow 9b1d3bc0-f4cd-4c50-9900-bd38668c480e failed (during ExecutingWor
kflowState): cromwell.engine.workflow.lifecycle.execution.job.preparation.JobPreparationActor$$anonfun$1$$anon$1: Call input an
d runtime attributes evaluation failed for task__0_rawreads__build:
Failed to evaluate input 'cfg' (reason 1 of 1): Failed to read_json("General_config.json") (reason 1 of 1): [Attempted 1 time(s
)] - IOException: Could not read from /localdisk/scratch/cdunn/pbcromwell/cromwell-executions/foo/9b1d3bc0-f4cd-4c50-9900-bd38668c480e/call-task__0_rawreads__build/execution/General_config.json: /localdisk/scratch/cdunn/pbcromwell/cromwell-executions/foo/9b1d3bc0-f4cd-4c50-9900-bd38668c480e/call-task__0_rawreads__build/execution/General_config.json
at cromwell.engine.workflow.lifecycle.execution.job.preparation.JobPreparationActor$$anonfun$1.applyOrElse(JobPreparationActor.scala:66)
```
The following also fails:
```
Unrecognized token on line 10, column 39:

Map[String, String] cfg = read_json(${config})
^
```
But it works if I provide the full input, as in
```
Map[String, String] cfg = read_json("/scratch/cdunn/pbcromwell/General_config.json")
```
Is this failing because "config" refers to an external input, relative to the run-directory, as in:
```
workflow foo {
input {
File ifile_config = "General_config.json"
}
call task__0_rawreads__build {
input: config=ifile_config, ...
}
```
Task "commands" are definitely able to read that file. Cromwell "localization" does the right thing.

I can put the full path in the workflow input, but I think I should not need to. Is this a bug?

Answers

Sign In or Register to comment.