GIScience / orstools-qgis-plugin

Plugin for QGIS with a set of tools to use openrouteservice API´s, based on openstreetmap
https://plugins.qgis.org/plugins/ORStools/
MIT License
92 stars 31 forks source link

Error 500 : Unable to find appropriate routing profile #54

Closed CorentinLemaitre closed 5 years ago

CorentinLemaitre commented 6 years ago

Hey,

I have a problem when i try to build a time-matrix from a point layer. I get the message : 500 (Unable to find appropriate routing profile). I try to change the profile, to select only 3 points but nothing have worked. (I have used OSMtools to build isochrone based on point layer with some problem but then i acheived to make it work after some research on the resolved issue in OSMtools repository.)

nilsnolde commented 6 years ago

Sorry for being so late.

HTTP 500: Indicates that the server does not support the functionality needed to fulfill the request. from ORS documentation.

Can you confirm that other locations, i.e. other point files, which are supposed to work do not throw this error? It sounds very much like a backend problem. Also, please include the full error traceback, then it's a bit easier to see what's going on.

nilsnolde commented 5 years ago

Unresponsive

fluegelrad commented 5 years ago

I am just facing a similar problem as @CorentinLemaitre: Trying to calculate a matrix, response is Error 500. Would you know of the cause of this issue? Haven't had the time to reproduce the problem in a clean environment yet, sorry.

Can you confirm that other locations, i.e. other point files, which are supposed to work do not throw this error? It sounds very much like a backend problem.

Nope. I haven't succeeded when it comes to matrix.

Also, please include the full error traceback, then it's a bit easier to see what's going on.

Here you go:

Python warning:

2018-11-09T16:09:23     WARNING    warning:sys:1: ResourceWarning:

             unclosed 

             traceback:

Messages:

2018-11-09T16:09:23     INFO    CRS conflict : The input layer CRS is EPSG:25832, the output layer CRS will be EPSG:4326
2018-11-09T16:09:23     CRITICAL    : : 500 (Unable to find an appropriate routing profile.)

OS: WIN10 1803 / build 17134.345 QGIS 3.2.3

fluegelrad commented 5 years ago

Today, I've tried a small matrix calculation (2x3 points) with OSM-Tools in two different QGIS projects (one of which I ran on a separate computer, but on the same API key).

Both requests were responded by Error 500. The Python warning and messages were similar. Any idea what the problem might be?

OS: WIN10 QGIS 3.2.3

nilsnolde commented 5 years ago

@fluegelrad sorry, was a hectic week.

I just started to work on OSM Tools again, finally. It'll be entirely refactored soon with processing support and new GUI etc..

I just pushed a fix for your immediate problem. The matrix module was updated a few months ago. The fix is really just one line of code, so it was quick enough to do. Pls try the master branch and let me know if it worked.

fluegelrad commented 5 years ago

Thx for your reply, @nilsnolde! Unfortunately, the bug seems to persist. I've reinstalled OSM Tools and tried to calculate a matrix.

When choosing routing mode driving-car I didn't get any warning. I only got a note that my project CRS 25832 wouldn't match the output CRS 4326. OSM tools did produce a matrix layer – but it was empty :(

For any other routing mode (driving-car, cycling, foot ...), Error 500 turned up again. I've already changed my CRS to 4326, but (unsurprisingly) that did not affect the result.

Pls try the master branch and let me know if it worked.

Pls allow me a noob question: What do you mean by 'master branch?'

Messages:

2018-11-19T10:55:40 INFO CRS conflict : The input layer CRS is EPSG:25832, the output layer CRS will be EPSG:4326 2018-11-19T10:55:41 CRITICAL : : 500 (Unable to find an appropriate routing profile.)

nilsnolde commented 5 years ago

Oh, ok, sorry: I meant install from Github. Practically that means: Download the .zip ball from here: https://github.com/nilsnolde/OSMtools/archive/master.zip

And extract the source code to C:\Users\USER\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\OSMtools (or whatever the current plugin location is, you can see that in the plugin manager in QGIS). But it's important that you don't change the directory name and only replace the files in the plugin folder. Let me know if you have more problems.

fluegelrad commented 5 years ago

Thx! Now at least Error 500 doesn't show up again. However, the calculation results in an empty OD-matrix again. I also get a python warning concerning an unclosed... file? (see below). Unfortunately, the warning doesn't specify what the unclosed object is. No traceback either :/

IMHO, this might be a different problem than the error issue though.

2018-11-19T11:58:35 WARNING warning:sys:1: ResourceWarning:

        unclosed 
        traceback:
nilsnolde commented 5 years ago

Really sorry man! Hope you understand that I rather focus on the refactoring right now. Then all the open issues will disappear. Incl this one. Latest end of next week!

If you're a bit python savvy, you can try this example with this library. I used the matrix endpoint somewhere in the middle.

nilsnolde commented 5 years ago

ok, now the master branch is fixed and provides a stable plugin. I'll submit now to plugin repo.