-
Notifications
You must be signed in to change notification settings - Fork 923
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Geocoding: "undefined method `split'" when Nominatim (version 5) doesn't return full URL in more_url field #4137
Comments
It's working for me (both on osm.org and also on a local machine) so perhaps it's an intermittent problem? Alternatively, it could be based on the location you are looking at. The only
|
I found the issue is a couple of lines up: more_url_params = CGI.parse(URI.parse(results.attributes["more_url"]).query) dulcy server returns just the query part of the URL in more_url, the other server return a full URL
That causes the error:
Dulcy is running the next version of Nominatim, the rewrite in Python, with Python webserver. You might also notice it puts the attributes in single quotes instead of double quotes (Python XML vs PHP XML serializing library). Adding @lonvia to ask if that's an oversight, the attribute is called 'URL' after all or meant to stay. |
Lonvia is on leave at the moment. The python based server can be taken out of service by Ops if critical. |
In any case it's a matter for the Nominatim issue tracker not this one. |
now tracked at osm-search/Nominatim#3138 |
I think there's still a bug where it's giving an incorrect error |
Oh sorry I misunderstood. I thought the split was on the python side. |
I think @mtmail has the correct diagnosis - this is the backtrace I get:
In which case I think that this is a Nominatim side bug and there's not a huge amount we can do on our side as the exception is in a library. What did you mean by "incorrect error" exactly @pnorman? |
I find the message a bit misleading because it's not an error contacting, it's a (potentially) invalid response. |
@pnorman You're right, I updated the title |
That's because we surround the entire method in an exception handler but the only exceptions we really expect to get are network related ones. |
Fixed the regression on the Nominatim side in osm-search/Nominatim@996026e. Looking at the code, the whole URL parsing is not really necessary. It is only done to get the excluded place IDs and they can be easier extracted from the |
URL
https://www.openstreetmap.org/search?query=banana
How to reproduce the issue?
Right now Nominatim doesn't seem to be reachable. The API request is done in Rails so I can't inspect the HTTP code or error message. If that happens the Rails prints an additional Ruby error "undefined method `split' for nil:NilClass" (which might or might not also be in the webserver error log)
Screenshot(s) or anything else?
The text was updated successfully, but these errors were encountered: