ORS tool API add error


I was using OSM tool to calculate driving distance between multiple starting postcode to single destination postcode but now OSM plugin is gone and ORS tool came in QGIS3.6. I can’t add API key, getting an error as could not convert string to float… and in OSM tool I used from layer and end layer to pass postcodes but there is no option coming up in ORS.

Please help where things are wrong at my end. see the attached screenshot for error.

How did you configure the tool? Pls share a screenshot of the batch processing window. Not sure what you mean with

and in OSM tool I used from layer and end layer to pass postcodes but there is no option coming up in ORS.


I installed the ORS plugin and then try to add API key which I generated on https://openrouteservice.org/dev/#/home and in my dashboard I can see key generated but when I am adding key using setting option in ORS plugin it is giving me an error see the attached screenshots

see attached Python error details.

Well, the error indicates that you’re trying to run a route on presumably empty X, Y…

Use the Map button to map coordinates to the GUI or use the batch processing tool.

What exactly are you doing after the you set up the key in the ORS Tools settings dialog? Just pressing OK? Is this the screenshot just before you try to process a route?


Error is coming while I am trying to insert API key,not trying to calculate anything.


Uhh??! Ok, that IS weird. Haven’t heard that one before and I’m sure most users run Windows.

Looking at the code, it’s impossible that this happens, since the Settings window has zero knowledge of the main plugin window, which is where your error comes from.

So, you basically do this and as soon as you hit OK, it throws your error?


Can you share the exact versions you’re using of Windows, QGIS and ORS Tools? Not sure I can anything about it at this point, since I likely don’t have access to the same config (running Ubuntu myself), but I do have an old Win 10 machine. I can try to get to it on the weekend.


I am using QGIS 3.6 Noosa on windows 10 ORS tool 1.0.2…
after entering api key I press ok and when I am pressing apply it is giving a value error and then I tried putting shape files in batch jobs -> directions from points entered start.shp files in input start point layer and selected the addrtype column which is postcode column in the shape file… then selected end.shp file in input end point layer and selected addrtype column in end id field. selected travel mode dirving-car layer mode all-by all pressed run… but getting an error

I used same shapes file to calculate driving distance using OSM tool and it worked like a charm… but after installing ORS it is not working…

Ok, that cleared it up. Please be as precise next time. So you did try to run empty coordinates… Which happens if you just press the Apply button without actually setting any coordinates. This behavior did not change from OSM Tools.

Now we’re talking. The response from the server is not JSON when you do batch, but actually should throw a better error. Can you pls email me the shp’s on nils@openrouteservice.org (zipped and telling me which is which)? Would be curious what caused it.


I have sent the files on the email given in the post

So, after I finally got the right files, there is no error! Following your instructions I can successfully route from start to end layer. Apart from the fact, you’re trying to route from Massachusetts to UK, which can’t be found.

Just to point this out again: you route from shapefiles, not from CSVs right?!

How do I get to this screen? I use QGIS 3.6 and need to add my API ORS new Token? Tnx Ori

There is a menu entry in Web and there is a config button right there in the UI…

Thanks Nils, and the host / address: https://openrouteservice.org in the settings?

No worries! https://api.openrouteservice.org is the host. That should be pre-configured in every ORS Tools installation. Is it not for you?

Did everything but I receive this msg Feature ID None caused a ApiError:
401 ({
"error": "Authorization field/api_key missing in request. If you do not have a token, please sign up for one at https://openrouteservice.org"

Please look at the form where you put in the host. What else do you see there? Can you maybe even correlate the error message to other fields you see in the configuration window?

1 Like

Token was obtained but still does not work from some reason.

You’re still seeing the exact error message you showed even though you copied the token like so: