ORS - Optimization - Inconsistent amount/capacity lengths: 0 and 1

Using the /optimization endpoint when sending a request with ORS example on website I get a normal response.

However, when I request with the example_1.json provided by Vroom on Github repo, I get this:

{
“code”: 2,
“error”: “Inconsistent amount/capacity lengths: 0 and 1.”
}

When I do the same request do Vroom demo directly, it works fine. Why is that?

Thank you

That’d be an outdated Vroom version :innocent:

I’ll fix next week the latest. Thanks for the reminder.

1 Like

Thank you for the fast response.

Is there any way to check which versions is ORS using?

No unfortunately not. If all goes well, I can upgrade today, latest tmrw though.

@Patrone, vroom is now up-to-date on the latest version and the example works :champagne:

@nils, thank you for your fast support.

I tried the example and I get this (unless I specifically set “profile”: “driving-car”):

{
“code”: 2,
“error”: “Invalid profile: car.”
}

shouldn’t the default work fine?

Ah right, forgot to mention that. Good that you figured it out.

No, vroom was initially built to only work with OSRM, ORS was only added by us last year. So this is a remnant of backwards compatibility.

2 Likes

Hi,
Where did you set “profile”: “driving-car” ?
I tried to place it in the json http request but is not working. I still get the “error”: “Invalid profile: car.”
This is how i run it:
version: “2.4”
services:
vroom2:
network_mode: host
image: vroomvrp/vroom-docker:v1.6.0
container_name: vroom2
volumes:
- ./vroom-conf/:/conf
environment:
- VROOM_ROUTER=ors # router to use, osrm or ors
depends_on:
- ors
ors:
image: docker_ors-app
container_name: ors
ports:
- 8080:8080
environment:
- BUILD_GRAPHS=False # Forces the container to rebuild the graphs, e.g. when PBF is changed in app.config
- JAVA_OPTS="-Djava.awt.headless=true -server -XX:TargetSurvivorRatio=75 -XX:SurvivorRatio=64 -XX:MaxTenuringThreshold=3 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:ParallelGCThreads=4 -Xms1g -Xmx2g"
- CATALINA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9001 -Dcom.sun.management.jmxremote.rmi.port=9001 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost"
volumes:
- ./ors-graphs:/ors-core/data/graphs
- ./ors-elevation_cache:/ors-core/data/elevation_cache
- ./ors-logs/ors/:/var/log/ors/
- ./ors-logs/tomcat/:/usr/local/tomcat/logs
- ./conf/app.config.sample:/ors-core/openrouteservice/target/classes/app.config
- ./data/heidelberg.osm.gz:/ors-core/data/osm_file.pbf

You’re fast with the docker repo… We didn’t even release it yet…

What you’re asking is not a ORS question, so this isn’t the right place to ask this. Please go through vroom’s repo: