Borrar filtros
Borrar filtros

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

3 visualizaciones (últimos 30 días)
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. :)

Respuestas (1)

Swapnil Tatiya
Swapnil Tatiya el 11 de Jul. de 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.

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by