Skip to content

Erro na call download_parquet que impede de proceder com downloads #447

Description

@tcubano

Bom dia,

Estou em uma rede controlada que impede acesso a alguns links e sites que podem conter executáveis maliciosos (trabalho com dados sensíveis de saúde), dentre eles o github. Por isso, desde a atualização do geobr para versão 2 eu não tenho conseguido usar nenhuma ferramenta de download. Como mencionado em outra issue (#423 (comment)), o pacote deveria fazer fallback para o servidor do Ipea, mas isso aparentemente não está acontecendo corretamente aqui no meu computador do trabalho.

Rodei um reprex e usei a função debugonce para tentar achar a raiz do problema. Seguem alguns outputs:

output do debugonce

> debugonce(geobr::read_region)
> shp_regioes <- geobr::read_region(year = 2025)
debugging in: geobr::read_region(year = 2025)
debug: {
    temp_meta <- select_metadata(geography = "regions", year = year, 
        simplified = simplified, verbose = verbose)
    temp_arrw <- download_parquet(filename_to_download = temp_meta$file_name, 
        showProgress = showProgress, cache = cache)
    if (is.null(temp_arrw)) {
        return(invisible(NULL))
    }
    temp <- convert_output(temp_arrw, output)
    return(temp)
}
Browse[1]> n
debug: temp_meta <- select_metadata(geography = "regions", year = year, 
    simplified = simplified, verbose = verbose)
Browse[1]> nUsing year/date 2025
debug: temp_arrw <- download_parquet(filename_to_download = temp_meta$file_name, 
    showProgress = showProgress, cache = cache)
Browse[1]> nA file must have been corrupted during download. Please restart your R session and try again.
debug: if (is.null(temp_arrw)) {
    return(invisible(NULL))
}
Browse[1]> n
debug: return(invisible(NULL))
Browse[1]> n
exiting from: geobr::read_region(year = 2025)

reprex

library(geobr)
shp_regioes <- geobr::read_region(year = 2025)
#> ℹ Using year/date 2025
#> duckdb is keeping downloaded extensions in a temporary directory:
#> ℹ C:\Users\THIAGO~1.MEN\AppData\Local\Temp\RtmpO0tA9s/duckdb/extensions
#> This is removed when the R session ends, so extensions are re-downloaded each session.
#> ℹ To keep them, point `options(duckdb.extension_directory =)` or the `DUCKDB_EXTENSION_DIRECTORY` environment variable at a permanent path.
#> ✖ A file must have been corrupted during download. Please restart your R session and try again.

Created on 2026-08-28 with reprex v2.1.1

Posso rodar outros códigos para tentar entender melhor, caso necessário. O pacote funciona perfeitamente no meu computador de casa, que não tem bloqueio nenhum de rede.

Agradeço por tentar resolver este problema! O pacote é bastante importante no fluxo de trabalho meu e da minha equipe, e estamos revertendo a baixar os dados direto do ftp do IBGE enquanto não temos acesso ao geobr.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions