rOpenSpain / CatastRo

R package to query Sede Electrónica del Catastro (Spain)

Home Page:http://ropenspain.github.io/CatastRo/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error con catr_atom_get_address

jesbrz opened this issue · comments

Me da este error cuando intento descargar las direcciones de cualquier localidad:

calles <- catr_atom_get_address("Astorga", to = "León")
Download failed

url 
 https://www.catastro.minhafp.es/INSPIRE/Addresses/ES.SDGC.AD.atom.xml not reachable.

Please try with another options. If you think this is a bug please consider opening an issue
Error in catr_hlp_dwnload(api_entry, filename, cache_dir, verbose, update_cache,  : 
  
Execution halted
In addition: Warning messages:
1: In download.file(url, filepath, quiet = isFALSE(verbose), mode = "wb") :
  URL 'https://www.catastro.minhafp.es/INSPIRE/Addresses/ES.SDGC.AD.atom.xml': status was 'SSL peer certificate or SSH remote key was not OK'
2: In download.file(url, filepath, quiet = isFALSE(verbose), mode = "wb") :
  URL 'https://www.catastro.minhafp.es/INSPIRE/Addresses/ES.SDGC.AD.atom.xml': status was 'SSL peer certificate or SSH remote key was not OK'

He comprobado más y ocurre con cualquiera de las opciones que incluyen llamadas a atom.

El certificado SSL del Catastro no es válido y según la configuración y el SO en el que ejecutes la función puede dar a este tipo de errores (generalmente pasa en Linux/Mac). Prueba alguna de estas soluciones (hilo):

#30 (comment)

Gracias @dieghernan. Esta solución que se menciona allí options(download.file.method="curl", download.file.extra="-k -L") funciona a la perfección.