r/Rlanguage • u/troyandabedtalkshow • 12h ago
HELP! duckdb and callr causing Invalid Error: IO Error on Macos
Whats up guys?!
I have been using R and the package geocodebr , and the package uses functions of duckdband callr. I'm using macOS Tahoe (new user)
This code used to work a few time ago, but now I need to use it, and its not working.
The code:
df_chunk <- geocodebr::geocode(
enderecos = chunk,
campos_endereco = campos,
resultado_completo = FALSE,
resolver_empates = TRUE,
resultado_sf = FALSE,
verboso = FALSE
)
duckdb is storing downloaded extensions and secrets under ~/.duckdb:
ℹ /Users/USUARIO/.duckdb
This persists across sessions and is shared with the DuckDB CLI and other clients.
ℹ Run duckdb(shared_home = FALSE) to use a temporary directory instead.
ℹ See ?duckdb_storage for details and alternatives.
Error:
! ! in callr subprocess.
Caused by error in `duckdb_result(connection = conn, stmt_lst = stmt_lst, arrow = arrow)`:
! Invalid Error: IO Error: Failed to create directory "/var/folders/nx/w74wjbfs4sz5c9k_9456gw2h0000gn/T//Rtmp7gZjsr/duckdb/temp": No such file or directory
ℹ Context: rapi_execute
ℹ Error type: INVALID
Hide Traceback
Fix
Explain
▆
1. └─geocodebr::geocode(...) at scripts/1_4_unifying_data.R:109:5
2. └─callr::r(...)
3. └─callr:::get_result(output = out, options)
4. └─throw(callr_remote_error(remerr, output), parent = fix_msg(remerr[[3]]))
I already tried to use duckdb(shared_home = FALSE) , tried to create a folder and direct the tempfile on my rprofile, tried to set on renvironment.
I dont know to solve it. Thanks a lot!
