-
Notifications
You must be signed in to change notification settings - Fork 20
ark kernel crash: ScopedInterruptHandler error when running in Positron #631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks. Are you also seeing this when running a standalone R script that reads the CSV file? Can you share a reprex? |
It's hard for me to come by a reprex because it's just reading a parquet or csv file. I note that if I use |
Are you also seeing this when running a standalone R script that reads the Parquet or CSV file? Can you share the code that works and that doesn't? What OS are you on? |
I am not sure what do you mean "standalone" R script. The code below are run right after I load the duckplyr package. The code below would cause crash.
The error message is
The code below works
|
I'm encountering the same issue, but it appears to only be with large csv files and only from within positron (2025.03.0 build 116) It only happens when I use I am using R 4.4.3 on Mac OS 15.3.1 with duckdb 1.2.0.9001 and duckplyr 1.0.1 - I first encountered the issue working interactively in positron. When I run the same script interactively from Rstudio it is fine and it also works as expected The code below reproduces the problem - it will download a 3GB file (New Zealand census data because that was what I was using at the time - I tried a few other files around 15MB and they were fine). library(tidyverse)
library(duckplyr)
write.csv(mtcars, "mtcars.csv")
# works
cars <- duckplyr::read_csv_duckdb("mtcars.csv")
# download a big file ~ 3GB
if (!fs::file_exists("census.csv")) {
options(timeout = 100000)
download.file("https://api.data.stats.govt.nz/rest/data/STATSNZ,CEN23_MAO_133,1.0/all?dimensionAtObservation=AllDimensions&format=csvfilewithlabels", "census.csv")
}
# works
census_df <- duckplyr::read_csv_duckdb("census.csv") |> collect()
# works with lifecycle warning
census_duck_df_from_csv <- duckplyr::duckplyr_df_from_csv("census.csv")
# works with lifecycle warning
census_duck_from_csv <- duckplyr::df_from_csv("census.csv")
# crashes on positron, fine via Rscript and in RStudio
census_duck <- duckplyr::read_csv_duckdb("census.csv")
census_duck |
@vizowl thank yo for sharing! Indeed, I am using Positron. |
Thanks. This is what I see:
Logs pasted below. Can you confirm?
@DavisVaughan @lionel-: Can I run the ark kernel in "standalone" mode (outside Positron) with a given R script? Other ideas for troubleshooting this? |
Shorter test script: test <- duckplyr::duckdb_tibble(a = 1:10, .prudence = c(cells = 3)) I see the variable preview in Positron panicking when ALTREP materialization throws an error. Working on a fix. Does |
With duckdb/duckdb-r#1066, the error is now nicer. I believe the rest needs to be handled in ark/harp/Positron:
|
We can't do much here, this reproduces in a much simpler setting. Keeping the issue open for reference. |
This works much better in the most recent Positron release with dev duckplyr. The dev version of Positron should also disable the table icon, which also may lead to a crash. |
I keep getting the following error message after reading parquet files. The code is as simple as just read a csv file with
read_csv_duckdb()
The text was updated successfully, but these errors were encountered: