bradjasper / ImportJSON

Import JSON into Google Sheets, this library adds various ImportJSON functions to your spreadsheet
GNU Lesser General Public License v3.0
2.11k stars 1.06k forks source link

DNS error: http://undefined (line 215, file "Code") #78

Open kaner1178 opened 6 years ago

kaner1178 commented 6 years ago

I am getting the above error if I try to debug the code in the script editor. Any ideas?

Line 215 is copied below: var jsondata = UrlFetchApp.fetch(url, fetchOptions);

otaviobonder-deel commented 6 years ago

Me too.

The script runs fine when I open the spreadsheet, but I'm trying to create a button to run it and I'm getting the same problem.

jackcarey commented 6 years ago

I've only see this error when accidentally forgetting the import URL. Are you definitely passing a URL to importJSON?

kaner1178 commented 6 years ago

Thanks for getting back to me, but I was able to get it to work!!

On Thu, Jun 14, 2018 at 7:23 PM jackcarey notifications@github.com wrote:

I've only see this error when accidentally forgetting the import URL. Are you definitely passing a URL to importJSON?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bradjasper/ImportJSON/issues/78#issuecomment-397467475, or mute the thread https://github.com/notifications/unsubscribe-auth/Ak8RmKr70FL76rzl83-APBvo8Ud99Jnwks5t8vBggaJpZM4TkDas .

venturaEffect commented 5 years ago

I've the same issue.

I'm running the script. Tried to put the url from this formula:

=transpose(importjson(concatenate("https://maps.googleapis.com/maps/api/geocode/json?address="&B2&"mountain","&key=API-KEY"),"/results/geometry/location/lat","noHeaders"))

like this:

var jsondata = UrlFetchApp.fetch("https://maps.googleapis.com/maps/api/geocode/json?address="&B2&"&key=API-KEY", fetchOptions);

But get this error:

ReferenceError: "B2" is not defined. (line 215, file "ImportJSON")

Any suggestion?

Really appreciate

venturaEffect commented 5 years ago

Thanks for getting back to me, but I was able to get it to work!! On Thu, Jun 14, 2018 at 7:23 PM jackcarey @.***> wrote: I've only see this error when accidentally forgetting the import URL. Are you definitely passing a URL to importJSON? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#78 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/Ak8RmKr70FL76rzl83-APBvo8Ud99Jnwks5t8vBggaJpZM4TkDas .

How did you get it?

yamato0010 commented 5 years ago

Hi, I am still having the same issue. How do you guys solve it? Highly Appreciated.

evenflowvisualart commented 5 years ago

Me too.

The script runs fine when I open the spreadsheet, but I'm trying to create a button to run it and I'm getting the same problem.

Guys, any luck? I want to add button too. Thanks.