ORS tool API add error


#1

Hi

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.


#2

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.

Thanks
Nils


#3

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


#4

see attached Python error details.


#5

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?


#6

Hi

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

Regards


#7

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?

image

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.


#8

Hi

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…


#9

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.

Cheers
Nils


#10

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


#11

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?!