electionsBR icon indicating copy to clipboard operation
electionsBR copied to clipboard

Error in download from TSE website

Open mark-williamson opened this issue 3 years ago • 1 comments

Hi - I'm getting the following error when I run df <- electionsBR::vote_mun_zone_local(2000):

trying URL 'https://cdn.tse.jus.br/estatistica/sead/odsele/votacao_candidato_munzona/votacao_candidato_munzona_2000.zip' Error in download.file(., dados) : cannot open URL 'https://cdn.tse.jus.br/estatistica/sead/odsele/votacao_candidato_munzona/votacao_candidato_munzona_2000.zip'

In addition: Warning message: In download.file(., dados) : URL 'https://cdn.tse.jus.br/estatistica/sead/odsele/votacao_candidato_munzona/votacao_candidato_munzona_2000.zip': status was 'Peer certificate cannot be authenticated with given CA certificates'

Any thoughts on this? I downloaded the package both through CRAN and through Github but got the error both ways. I can navigate to https://cdn.tse.jus.br/estatistica/sead/odsele/votacao_candidato_munzona/votacao_candidato_munzona_2000.zip fine in my regular browser, but there seems to be an issue when running the request through the package.

Any advice is appreciated - thanks for the package!

mark-williamson avatar Jul 16 '21 14:07 mark-williamson

Hello, @mark-williamson, thanks for reaching out. I tried, but failed to reproduce the same error when running df <- electionsBR::vote_mun_zone_local(2000).

Do you mind sharing more details on this with us? The output of sessionInfo() would be a good start. In any case, TSE's webserver can be unstable at times, so I think waiting a day or so before trying again might be a good idea.

meirelesff avatar Jul 20 '21 17:07 meirelesff