Clear Filters
Clear Filters

websave not working properly and giving error "IP address could not be determined"

7 views (last 30 days)
I am using MATLAB R2018a and want to read and copy the content from a url and write it in a .txt file. but websave is not working properly and giving the error mentioned below. it is basically removing "/" from the url due to which url is not found. I am not getting why it is responding like this ....
CODE
bundle_url = 'http://data.votchallenge.net/vot2016/main/description.json';
data = webread(bundle_url)
ERROR
Error using webread (line 122)
The IP address of "data.votchallenge.netvot2016maindescription.json" could not be determined.
I have also tried urlwrite but it is only returning the word "Found" in the .txt file.
Furthermore, I have tried the code given by Matlab Examples but it is also giving the same error.
MATLAB EXAMPLE
api = 'http://climatedataapi.worldbank.org/climateweb/rest/v1/';
url = [api 'country/cru/tas/year/USA'];
S = webread(url)
ERROR
Error using webread (line 122)
The IP address of "climatedataapi.worldbank.orgclimatewebrestv1countrycrutasyearUSA" could not be determined.
Can anyone help me with this issue ??? any type of help will be appreciated. Thankyou in advance for your time and help. :)

Answers (1)

Swapnil Tatiya
Swapnil Tatiya on 11 Jul 2023
Could you please try the same code with latest matlab version, because when I run it on matlab online I'm able to fetch the data from the links.
Hope this helps.

Products


Release

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!