Skip to content
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

Closing CSV in data explorer does not close file completely #5924

Open
marklyng opened this issue Jan 9, 2025 · 1 comment
Open

Closing CSV in data explorer does not close file completely #5924

marklyng opened this issue Jan 9, 2025 · 1 comment
Labels
info needed Waiting on information

Comments

@marklyng
Copy link

marklyng commented Jan 9, 2025

System details:

Positron and OS details:

Positron Version: 2024.12.0 (system setup) build 96
Code - OSS Version: 1.93.0
Commit: c5ce275
Date: 2024-11-28T02:50:45.229Z
Electron: 30.4.0
Chromium: 124.0.6367.243
Node.js: 20.15.1
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.26100

Interpreter details:

R 4.3.1 and Python 3.12.1

Describe the issue:

When looking at a csv-file in the data viewer, the file is set to read-only for other programs. Closing the data in the data viewer does not relieve the read-only status. Positron must be exited completely to be able to edit the csv with e.g. DuckDB or Microsoft Excel.

Steps to reproduce the issue:

R script

  • Add a folder to workspace
library(duckdb) # V1.1.3-1

readr::write_csv(data.frame(a=1, b=2), "test.csv")

con <- dbConnect(duckdb())
duckdb_read_csv(con, "test", "test.csv") # No problem
dbDisconnect(con)

# Now, open test.csv with Positron Data Explorer then close it and try again:
con <- dbConnect(duckdb())
duckdb_read_csv(con, "test", "test.csv")
Error in `dbSendQuery()`:
! rapi_prepare: Failed to prepare query COPY test FROM 'C:\Users\path\to\test.csv' (DELIMITER ',', QUOTE '"', HEADER true, NULL '')
Error: IO Error: File is already open in 
C:\Program Files\Positron\Positron.exe (PID 26592)

Image

Expected or desired behavior:

My expectation was that closing the file in the Position Data Explorer would open up write access for other programs.

@juliasilge
Copy link
Contributor

I am not able to reproduce this problem with a more recent build of Positron. Would you mind getting the latest version from https://positron.posit.co/download and trying out your code again?

@juliasilge juliasilge added the info needed Waiting on information label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info needed Waiting on information
Projects
None yet
Development

No branches or pull requests

2 participants