You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unknown vehicle 'bike' in profile: Default vehicle profiles not generated? #2758
I installed the Routing API server as per the docs and modified the config-example.yml by replacing car with bike here:
graph.flag_encoders: bike
According to the inline comments this should be fine ("More options: foot,hike,bike,bike2,mtb,racingbike,motorcycle,wheelchair (comma separated)")
I also replaced the default car profile with
profiles:
- name: bike
vehicle: bike
weighting: fastest
and added
profiles_ch:
- profile: bike
Running
java -Ddw.graphhopper.datareader.file=oldenburg.osm.pbf -jar *.jar server config-example.yml
however returns
[main] ERROR io.dropwizard.cli.ServerCommand - Unable to start server, shutting down
java.lang.IllegalArgumentException: Unknown vehicle 'bike' in profile: name=bike|vehicle=bike|weighting=fastest|turnCosts=false|hints={}. Available vehicles: car
running the same command with import instead of server returns
Unknown vehicle 'bike' in profile: name=bike|vehicle=bike|weighting=fastest|turnCosts=false|hints={}. Available vehicles: car
I tried the docs, but I cannot seem to find an option to generate that profile, even guessing by the inline comments bike seems to be a standard profile included?
Seems like for older version of Graphhopper this was done by running ./graphhopper.sh import <> instead?
It would be really helpful if vehicle types mentioned in the example config would at least return a more dedicated error response or maybe even trigger the required import/generation automatically?
Once you start GraphHopper a folder at graph.location is created and filled (probably you did this with the car config). If you change the configuration you either have to change graph.location or remove the folder. Can you try if this fixes the problem you have?
Also make sure you are using the latest version 6.2 - I just updated the readme as an older 6.0 was still there.
./graphhopper.sh import <>
You can still use this import command when you replace server with import in the java command. Also have a look into deploy.md.
Indeed, that would also give a better error description. But I was able to reproduce the mentioned error message for 6.2 (when changing from car to bike without a folder removal).
Yes, this is because we run checkProfilesConsistency, for the loaded EncodingManager, which gets the 'car' vehicle from the -gh folder as it is loaded from disk. We have another check, that makes sure the profiles in the config file match the ones in the -gh folder, but this only runs afterwards. I think we only need to change the order of the checks.
Activity
karussell commentedon Feb 17, 2023
Once you start GraphHopper a folder at
graph.locationis created and filled (probably you did this with the car config). If you change the configuration you either have to change graph.location or remove the folder. Can you try if this fixes the problem you have?Also make sure you are using the latest version 6.2 - I just updated the readme as an older 6.0 was still there.
You can still use this import command when you replace
serverwithimportin the java command. Also have a look into deploy.md.otbutz commentedon Feb 17, 2023
Shouldn't this trigger an error if the graph doesn't fit to the configuration? At least for encoded values we're checking for consistency.
karussell commentedon Feb 17, 2023
Indeed, that would also give a better error description. But I was able to reproduce the mentioned error message for 6.2 (when changing from car to bike without a folder removal).
larsschwarz commentedon Feb 17, 2023
Changed the
graph.locationfolder and restarted the server. Works fine now. Thanks.However a more dedicated error response would be helpful, especially because these are default config values.
easbar commentedon Feb 18, 2023
Yes, this is because we run
checkProfilesConsistency, for the loaded EncodingManager, which gets the 'car' vehicle from the -gh folder as it is loaded from disk. We have another check, that makes sure the profiles in the config file match the ones in the -gh folder, but this only runs afterwards. I think we only need to change the order of the checks.karussell commentedon Feb 18, 2023
Thanks @easbar !
Improve error message when using another vehicle than the ones used f…
[RSPS-1174] : Upgrade gh7 (#35)
[RSPS-1546] Upgrade to GH8 (#38)