madenwala / Yelp.Api

C# Portable Class Library for Yelp (Fusion API v3 from 2017). Works with Windows 10, Windows 8, Windows Phone, ASP.NET, Xamarin (iOS/Android), Mac, and other .NET projects. Yelp's (v3) Fusion API allows you to get the best local business information and user reviews of over million businesses in 32 countries.
6 stars 11 forks source link

"Error converting value {null} to type 'System.Double'. Path 'coordinates.latitude' #5

Closed jdoan3 closed 7 years ago

jdoan3 commented 7 years ago

It seems for every YelpFusion api I use I get a similar issue when I am placing a lattitude/longitude value in the autoComplete/GetBusiness/Search functions of the yelp.Api. I really don't know how to get around this. For a test scenario, I used:

request.Term = "Papa Johns Pizza"; request.Latitude = double.Parse("30.0477325"); request.Longitude = double.Parse("-95.18446720000003");

I even used request.Location = "2855 W Lake Houston Pkwy, Kingwood, TX 77339, USA";

From here when I run the GetSearch I run into the error converting value {null}. I tried doing some searching on why this was the case but couldn't find anything.

I also did a test case where I ran autoComplete for this, which gave me a business Id. request.Term = "Domino's Pizza"; request.Latitude = double.Parse("30.0498865"); request.Longitude = double.Parse("-95.18670780000002");

I even used request.Location = "4319 Kingwood Dr, Kingwood, TX 77339, USA";

From the business Id I try to get the business from the GetBusiness call but I run into the same error.

Pinski commented 7 years ago

Hello @jdoan3,

I ran into this same issue. I created a pull request to fix this (https://github.com/madenwala/Yelp.Api/pull/6). However, I've tried contacting the owner of this repo and I've created a few pull requests and have heard nothing in return. I started a fork of this library that is compatible with .Net Core Web. I've fixed this problem and added some more features if you are interested.

https://www.nuget.org/packages/Yelp.Api.Web

madenwala commented 7 years ago

Hi sorry for the late reply, but the pull request for this fix has been accepted, I tested your search @jdoan3 and it is working now, and I've pushed this update to NuGet as package 1.2.5.0

Thanks again, Mohammed