Ivan Krylov
2023-Dec-17 14:25 UTC
[R] call: file.exists("~/.Rtk2theme") error: file name conversion problem -- name too long?
Dear Alipio Galiana, Please keep the mailing list in the "copy" field of your messages. This way other people can chime in with advice too. On Sun, 17 Dec 2023 15:11:14 +0100 <azhriel1 at gmail.com> wrote:> > sessionInfo() > R version 4.3.2 (2023-10-31 ucrt) > Platform: x86_64-w64-mingw32/x64 (64-bit) > Running under: Windows 11 x64 (build 22631) > > Matrix products: default > > > locale: > [1] LC_COLLATE=Spanish_Spain.utf8 LC_CTYPE=Spanish_Spain.utf8 > [3] LC_MONETARY=Spanish_Spain.utf8 LC_NUMERIC=C > [5] LC_TIME=Spanish_Spain.utf8> > path.expand('~') > [1] "C:\\Users\\Alipio\\OneDrive - Universitat de > Val\xe8ncia\\Documentos"The problem here is that R thinks that your "Documents" directory has a path that contains invalid UTF-8 bytes. This causes file.exists(...) to fail when it tries to decode the path as UTF-8. Can you at least temporarily disable OneDrive so that your Documents directory would be "C:\\Users\\Alipio\\Documentos"? This should keep R happy. The proper solution would be to figure out why R is getting an ANSI-encoded path to the Documents directory instead of it being in UTF-8. I don't have Windows 11 installed or OneDrive set up to keep my data, so you might need the help of someone else with this. -- Best regards, Ivan
Ivan Krylov
2023-Dec-17 16:27 UTC
[R] call: file.exists("~/.Rtk2theme") error: file name conversion problem -- name too long?
Sorry for the double e-mail. On Sun, 17 Dec 2023 17:25:38 +0300 Ivan Krylov <krylov.r00t at gmail.com> wrote:> Can you at least temporarily disable OneDrive so that your Documents > directory would be "C:\\Users\\Alipio\\Documentos"? This should keep R > happy.It should also work if you set the environment variable R_USER to some ASCII-representable path: (in cmd.exe):> set R_USER=C:\Users\Alipio\R_USER > "C:\Program Files\R\R-4.3.2\bin\R.exe" CMD RguiPlease let me know if setting the environment variable helps. I suspect that getenv() may be returning ANSI-encoded bytes even when the UCRT locale encoding is set to UTF-8. -- Best regards, Ivan
Possibly Parallel Threads
- call: file.exists("~/.Rtk2theme") error: file name conversion problem -- name too long?
- Possible Bug: file.exists() Function. Due to UTF-8 Encoding differences on Windows between R 4.0.1 and R 3.6.3?
- Possible Bug: file.exists() Function. Due to UTF-8 Encoding differences on Windows between R 4.0.1 and R 3.6.3?
- Possible Bug: file.exists() Function. Due to UTF-8 Encoding differences on Windows between R 4.0.1 and R 3.6.3?
- Possible Bug: file.exists() Function. Due to UTF-8 Encoding differences on Windows between R 4.0.1 and R 3.6.3?