Skip to content
This repository was archived by the owner on Feb 11, 2024. It is now read-only.

look-up by name seems to fail #7

Closed
emacsomancer opened this issue Aug 15, 2021 · 3 comments
Closed

look-up by name seems to fail #7

emacsomancer opened this issue Aug 15, 2021 · 3 comments

Comments

@emacsomancer
Copy link

I can confirm that if I visit the URI below in a browser, it shows JSON data, but noaa fails with this error:

[error] request--callback: peculiar error
data: "(:num-redirects 0 :url-effective \"https://nominatim.openstreetmap.org/search?q=New York City&limit=1&format=json\")" 
symbol-status: error 
E Error response: (error . "exited abnormally with code 3
") 
response: #s(request-response nil nil "(:num-redirects 0 :url-effective \"https://nominatim.openstreetmap.org/search?q=New York City&limit=1&format=json\")" (error . "exited abnormally with code 3
") error "https://nominatim.openstreetmap.org/search?q=New York City&limit=1&format=json" nil (:parser buffer-string :error #[128 "\300�\301\"A@\300�\302\"A@\300�\303\"A@\300�\304\"A@\305\306�\"\210\305\307�\"\210\305\310�\"\210\305\311�\"\207" [plist-member :data :error-thrown :response :symbol-status message "data: %S " "symbol-status: %S " "E Error response: %S " "response: %S "] 8 "

(fn &key DATA ERROR-THROWN RESPONSE SYMBOL-STATUS &allow-other-keys)"] :status-code ((500 lambda (&rest _) (message "500: from openstreetmap"))) :success noaa--osm-callback :url "https://nominatim.openstreetmap.org/search?q=New York City&limit=1&format=json" :response #0 :encoding utf-8) #<killed buffer> "" nil curl) 
@thomp
Copy link
Owner

thomp commented Aug 16, 2021

I'm unable to reproduce this. Would you be willing to share the steps you take that lead to this error?

The following seems to work w/o issue (latitude and longitude are updated based on the server response):

(request (format noaa--osm-api "New York City")
       :parser 'buffer-string ;'json-read
       :error (cl-function
               (lambda (&key data error-thrown response symbol-status &allow-other-keys)
                 (message "data: %S " data)
                 (message "symbol-status: %S " symbol-status)
                 (message "E Error response: %S " error-thrown)
                 (message "response: %S " response)))
       :status-code '((500 . (lambda (&rest _) (message "500: from openstreetmap"))))
       :success 'noaa--osm-callback)

@emacsomancer
Copy link
Author

Yes, this seems to be the bit that's been giving me that error.

I tried just "manually" using request with an OSM URL and get similar errors. So, for some reason, some issue with request. (I've tried on multiple devices with different configs.)

@thomp
Copy link
Owner

thomp commented May 15, 2022

Closing as unable to reproduce.

@thomp thomp closed this as completed May 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants