bcgov / bcgov/ccissr

Failed to create a temporary directory

Open
#37 0 comments 0 reactions 1 assignee Claimed by @kdaust View on GitHub
Dominant language
R
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Running the "spp_dashboard_plots.R" code. It failed to create a temporary directory and I had to manually do it. See R output below.

##species bubbleplots
> perexp <- spp_persist_expand(con, spp_list = spp_list, fractional = FALSE)
▶ Computing persistence for: Pl, Sx, Fd, Cw, Hw, Py, Bl, At, Ac, Ep, Yc, Pw, Ss, Bg, Lw, Mb, Ba
▶ Creating materialised table 'bgc_eda_mat' ...
✓ bgc_eda materialised
Error in `duckdb_result()`:
! Invalid Error: IO Error: Failed to create directory "C:\Users\vanes\AppData\Local\Temp\RtmpsLqfy6/duckdb/temp": The system cannot find the path specified.

ℹ Context: rapi_execute
ℹ Error type: INVALID
Run `rlang::last_trace()` to see where the error occurred.

> rlang::last_trace()

Error in `duckdb_result()`:
! Invalid Error: IO Error: Failed to create directory "C:\Users\vanes\AppData\Local\Temp\RtmpsLqfy6/duckdb/temp": The system cannot find the path specified.

ℹ Context: rapi_execute
ℹ Error type: INVALID
---
Backtrace:

1. └─ccissr::spp_persist_expand(con, spp_list = spp_list, fractional = FALSE)
2. └─ccissr:::calc_spp_persist_expand(...) at ccissrFork/R/cciss_duckdb.R:702:5
3. ├─DBI::dbGetQuery(con, sql) at ccissrFork/R/cciss_duckdb.R:642:3
4. └─DBI::dbGetQuery(con, sql)
5. └─DBI (local) .local(conn, statement, ...)
6. ├─DBI::dbSendQuery(conn, statement, ...)
7. └─duckdb::dbSendQuery(conn, statement, ...)
8. └─duckdb (local) .local(conn, statement, ...)
9. └─duckdb:::duckdb_result(connection = conn, stmt_lst = stmt_lst, arrow = arrow)
Run rlang::last_trace(drop = FALSE) to see 17 hidden frames.

> tempdir()
[1] "C:\\Users\\vanes\\AppData\\Local\\Temp\\RtmpsLqfy6"
> dir.exists(tempdir())
[1] TRUE
> dir.create(
+ file.path(tempdir(), "duckdb", "temp"),
+ recursive = TRUE,
+ showWarnings = TRUE
+ )
> dir.exists(file.path(tempdir(), "duckdb", "temp"))
[1] TRUE

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.