Skip to content

Error in gzfile(file, "rb") : all connections are in use #5

@kvelleby

Description

@kvelleby

When running wcde::get_wcde() for several countries, I get "Error in gzfile(file, "rb") : all connections are in use". NCONNECTIONS in normally compiled R is 128. The error occurrs because line 98 in get_wcde_single calls the function read_with_progress() multiple times. read_with_progress opens connections using url() without explicitly closing them. I suggest you do con <- f |> url(); df <- readRDS(con); close(con)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions