# Task Failed when use --boundary argument calling NodeODM deployed in Docker

**URL:** <https://community.opendronemap.org/t/task-failed-when-use-boundary-argument-calling-nodeodm-deployed-in-docker/26994>\
**Category:** ClusterODM\
**Tags:** nodeodm, docker\
**Created:** [October 12, 2026, 7:33am UTC](https://community.opendronemap.org/t/task-failed-when-use-boundary-argument-calling-nodeodm-deployed-in-docker/26994 "2026-10-12T07:33:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoeyYoung](https://community.opendronemap.org/user_avatar/community.opendronemap.org/joeyyoung/32/19788_2.png) [@JoeyYoung](https://community.opendronemap.org/u/JoeyYoung)\
**Post date:** [October 12, 2026, 7:33am UTC](https://community.opendronemap.org/t/task-failed-when-use-boundary-argument-calling-nodeodm-deployed-in-docker/26994/1 "2026-10-12T07:33:46Z")

</div>

Hello folks.

I used the `--boundary` parameter when calling the NodeODM service deployed in Docker, but the task execution failed.

Docker image: opendronemap/nodeodm:gpu

Task init request formdata `options`:

```auto
[{"name":"boundary","value":"{ \"type\": \"FeatureCollection\", \"features\": [{ \"type\": \"Feature\", \"properties\": {}, \"geometry\": { \"type\": \"Polygon\", \"coordinates\": [ [ [ 118.0128572448912, 28.50126887426447], [118.01247468400081, 28.50130002848917], [118.01148504550815, 28.5018827137279], [118.0120997254289, 28.50284532387725], [118.01207040492928, 28.50351902682331], \t\t\t[118.01204689122568, 28.50394794657534], \t\t\t[118.01325225983096, 28.50358009368804], \t\t\t[118.01373554189047, 28.50316731453679], \t\t\t[118.01374797683852, 28.50203030949384], \t\t\t[118.01396506314367, 28.50203525673123], \t\t\t[118.01394932367025, 28.50149287524119], \t\t\t[118.01330708056972, 28.50126511130785], \t\t\t[\t\t\t 118.0128572448912, \t\t\t 28.50126887426447 \t\t\t] ] ] } } ] }"}]

```

Error log:

```auto
usage: run.sh [options] <dataset name>
run.py: error: argument --boundary: { type: FeatureCollection, features: [{ type: Feature, properties: {}, geometry: { type: Polygon, coordinates: [ [ [ 118.0128572448912, 28.50126887426447], [118.01247468400081, 28.50130002848917], [118.01148504550815, 28.5018827137279], [118.0120997254289, 28.50284532387725], [118.01207040492928, 28.50351902682331], [118.01204689122568, 28.50394794657534], [118.01325225983096, 28.50358009368804], [118.01373554189047, 28.50316731453679], [118.01374797683852, 28.50203030949384], [118.01396506314367, 28.50203525673123], [118.01394932367025, 28.50149287524119], [118.01330708056972, 28.50126511130785], [118.0128572448912, 28.50126887426447] ] ] } } ] } is not a valid JSON string.

```

How should I pass the `--boundary` parameter?

---

<div class="post-metadata">

**Author:** ![Maurice.Sobiera](https://community.opendronemap.org/user_avatar/community.opendronemap.org/maurice.sobiera/32/6956_2.png) [@Maurice.Sobiera](https://community.opendronemap.org/u/Maurice.Sobiera)\
**Post date:** [October 12, 2026, 8:34am UTC](https://community.opendronemap.org/t/task-failed-when-use-boundary-argument-calling-nodeodm-deployed-in-docker/26994/2 "2026-10-12T08:34:03Z")

</div>

Hi, this is not a problem with your GeoJSON – it is a quoting bug in NodeODM.

Since NodeODM 3.6.x (`libs/odmRunner.js`, commit 7328aba, April 2026) every option value is wrapped as `"value"` for the shell, and **all double quotes inside the value are stripped first** :

```js
const shQuote = s => {
    s = String(s).replace(/"/g, "")
    return `"${s}"`;
}

```

So ODM receives `{ type: FeatureCollection, features: [...] }` – exactly what your error shows – and `--boundary` (or any other JSON option) can never be passed inline. I reproduced it with your polygon: same error with current NodeODM master, works after the fix below.

**Workarounds right now (no rebuild):**

1. Pass a _path_ instead of the JSON string – a path has no quotes, so it survives. Mount a folder into the container and point `boundary` at the file:

```auto
docker run ... -v /host/boundaries:/boundaries opendronemap/nodeodm:gpu

```

task option: `{"name":"boundary","value":"/boundaries/area.geojson"}`
2. Or patch NodeODM: replace `shQuote` in `/var/www/libs/odmRunner.js` with POSIX single quoting (bind-mount the patched file over it):

```js
const shQuote = s => {
    s = String(s);
    if (os.platform() === "win32"){
        s = s.replace(/"/g, "");
        return `"${s}"`;
    }else{
        // single quotes keep the value literally, incl. the double quotes JSON needs
        return `'${s.replace(/'/g, `'\\''`)}'`;
    }
}

```

Test with your polygon (fake run.sh using ODM’s own `path_or_json_string` check):

| NodeODM | result |
| --- | --- |
| master 3.6.2 | `... is not a valid JSON string.` exit 2 |
| with fix | boundary parsed (FeatureCollection, 1 feature), exit 0 |

Pull request with this change: [Keep double quotes in option values (fixes JSON options such as --boundary) by Ghost7K · Pull Request #275 · OpenDroneMap/NodeODM · GitHub](https://github.com/OpenDroneMap/NodeODM/pull/275) – until it is merged and a new `opendronemap/nodeodm` image is published, workaround 1 is the easiest.

---

<div class="post-metadata">

**Author:** ![JoeyYoung](https://community.opendronemap.org/user_avatar/community.opendronemap.org/joeyyoung/32/19788_2.png) [@JoeyYoung](https://community.opendronemap.org/u/JoeyYoung)\
**Post date:** [October 12, 2026, 8:52am UTC](https://community.opendronemap.org/t/task-failed-when-use-boundary-argument-calling-nodeodm-deployed-in-docker/26994/3 "2026-10-12T08:52:02Z")

</div>

I try the two of workarounds, both works.

Thank a lot!😆

---

<div class="post-metadata">

**Author:** ![Maurice.Sobiera](https://community.opendronemap.org/user_avatar/community.opendronemap.org/maurice.sobiera/32/6956_2.png) [@Maurice.Sobiera](https://community.opendronemap.org/u/Maurice.Sobiera)\
**Post date:** [October 12, 2026, 9:05am UTC](https://community.opendronemap.org/t/task-failed-when-use-boundary-argument-calling-nodeodm-deployed-in-docker/26994/4 "2026-10-12T09:05:05Z")

</div>

You are welcome, have a great day.

---

<div class="post-metadata">

**Author:** ![system](https://community.opendronemap.org/uploads/default/original/2X/4/4860b651256c708809149b6e644fa41d44687661.png) [@system](https://community.opendronemap.org/u/system)\
**Post date:** [November 11, 2026, 9:05am UTC](https://community.opendronemap.org/t/task-failed-when-use-boundary-argument-calling-nodeodm-deployed-in-docker/26994/5 "2026-11-11T09:05:38Z")

</div>

Closed on November 11, 2026, 9:05am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
