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

bug: reading an empty json object into a Map task output produces a ValueError #726

Open
ahvigil opened this issue Feb 21, 2025 · 0 comments

Comments

@ahvigil
Copy link

ahvigil commented Feb 21, 2025

On miniwdl v1.12.1 running the following minimal workflow example:

version development

workflow demo {
    call echo
}

task echo {
    command <<<
        echo '{}' > output.json
    >>>

    output {
        Map[String, String] output_map = read_json("output.json")
    }
}

produces the following task runtime error during execution

Traceback (most recent call last):
  File ".../python3.12/site-packages/WDL/runtime/task.py", line 213, in run_local_task
    outputs = link_outputs(
              ^^^^^^^^^^^^^
  File ".../python3.12/site-packages/WDL/runtime/task.py", line 891, in link_outputs
    return outputs.map(
           ^^^^^^^^^^^^
  File ".../python3.12/site-packages/WDL/Env.py", line 151, in map
    fb = f(b)
         ^^^^
  File ".../python3.12/site-packages/WDL/runtime/task.py", line 894, in <lambda>
    map_paths(
  File ".../python3.12/site-packages/WDL/runtime/task.py", line 865, in map_paths
    d = int(math.ceil(math.log10(len(v.value))))
                      ^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: math domain error
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

1 participant