-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
polars 1.17 can not save file to RamDisk #20231
Comments
I cannot reproduce this - I've tested on a mount point other than the C drive. Can you show the logs when you run after setting |
can not show log import polars as pl
print(os.environ.get('POLARS_VERBOSE')) # 1
df = pl.DataFrame({'A': [1, 2, 3, 4, 5], 'B': ['a', 'b', 'c', 'd', 'e']})
# df.write_parquet(r'd:\test.parquet') # SSD
df.write_parquet(r'M:\test.parquet') # ImDisk Toolkit (py311_1) D:\GitHub\ddump\tests>python t1.py
1
Traceback (most recent call last):
File "D:\GitHub\ddump\tests\t1.py", line 10, in <module>
df.write_parquet(r'M:\test.parquet') # ImDisk Toolkit
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Users\Kan\miniconda3\envs\py311_1\Lib\site-packages\polars\dataframe\frame.py", line 4038, in write_parquet
self._df.write_parquet(
OSError: 函数不正确。 (os error 1)
It create a empty file, then throw error M:\>dir
驱动器 M 中的卷是 RamDisk
卷的序列号是 E62C-C447
M:\ 的目录
2024/12/10 16:45 0 test.parquet
1 个文件 0 字节
0 个目录 8,555,302,912 可用字节
|
I have tried on two computers and they both reported errors Could it be caused by this place? |
Hi, @nameexhaustion use std::path::{Path};
fn main() {
let path = Path::new("D:\\test.csv");
eprintln!(
"try_get_writeable: local: {} (canonicalize: {:?})",
path.to_str().unwrap(),
std::fs::canonicalize(&path)
);
let path = Path::new("M:\\test.csv");
eprintln!(
"try_get_writeable: local: {} (canonicalize: {:?})",
path.to_str().unwrap(),
std::fs::canonicalize(&path)
);
} warning: `C:\Users\Kan\.cargo\config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.01s
Running `target\debug\rust-test.exe`
try_get_writeable: local: D:\test.csv (canonicalize: Ok("\\\\?\\D:\\test.csv"))
try_get_writeable: local: M:\test.csv (canonicalize: Err(Os { code: 1, kind: Uncategorized, message: "函数不正确。" }))
M drive is create by ImDisk Toolkit |
I see, in that case it should work after the PR is merged |
Checks
Reproducible example
I used to save files on RamDisk, but after updating from 1.16 to 1.17, I found that the files could not be saved anymore.
I tested two RamDisk software, but neither of them works
ImDisk Toolkit
https://imdisk-toolkit.en.lo4d.com/download
Log output
No response
Issue description
polars 1.17 can not save file to RamDisk
Expected behavior
save file to RamDisk
Installed versions
The text was updated successfully, but these errors were encountered: