Skip to content
This repository has been archived by the owner on May 11, 2023. It is now read-only.

Not able to successfully geomance a file via API geomance endpoint #95

Open
michelleminkoff opened this issue Jan 15, 2016 · 0 comments

Comments

@michelleminkoff
Copy link
Member

When I try to form a request using Ruby's RestClient to geomance a spreadsheet of city names, I get a 500 InternalServerError back.

Here are the docs I'm looking at: http://geomancer.io/about#api. An example of how to use the geomance endpoint, using requests, even in Python, would be very helpful.

I have attached the file I am trying to geomance (I attached it as a txt due to GitHub Issues not liking my csv, but I have been trying to run it in my RestClient request as a csv.My request code looks like:
result = RestClient.post(
"http://geomancer.io/api/geomance/",
{
:form =>JSON.generate({0=>{'type'=>'city','append_columns'=>['total_population']}}),
:file=> File.new("allstatesmodified.csv", "rb")
}
)
If I log my request, I get: RestClient.post "http://geomancer.io/api/geomance/", 39458 byte(s) length, "Accept"=>"/; q=0.5, application/xml", "Accept-Encoding"=>"gzip, deflate", "Content-Length"=>"39458", "Content-Type"=>"multipart/form-data; boundary=48371"

It returns: 500 InternalServerError | text/html 2963 bytes

I see the same error in my JS console when I just try to access that page from Chrome: Failed to load resource: the server responded with a status of 500 (INTERNAL SERVER ERROR)

allstatesmodified.txt

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

1 participant