UKCensusAPI
UKCensusAPI copied to clipboard
Failure in name resolution when collecting data
In some contexts, when the function get_data of NomisWeb is called, I get a "urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>" error
- what seems to be an issue with DNS resolution. I get this on a remote host with some network restrictions - everything works on local. However, when running "host www.nomisweb.co.uk" on it, the DNS resolution is fine, and a curl on the url where ukcensusapi fails also works - so I guess it is an issue of urllib specific to this host.
Could we:
- add an option to provide the host IP directly, what could circumvent this problem?
- or switch to requests (as it is suggested in the code) which may not fail?