You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RStudio Edition : Desktop
RStudio Version : 1.1.453
OS Version : Windows 10
R Version : 3.5.0
Steps to reproduce the problem
In the plot window:
Export
Save as image
png (or other)
Save
Describe the problem in detail
"R code execution error"
If I try saving "manually"
dev.copy(png, file = "uab.png"); dev.off()
Error in device(...) : unable to start png() device
In addition: Warning messages:
1: In device(...) : unable to open file 'uab.png' for writing
2: In device(...) : opening device failed
It works if I use the usual Windows R console.
So it's definitely an R-Studio problem.
Describe the behavior you expected
I expected that saving a plot would save the plot to disk
R Studio Version 1.2.1335,
R:
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 3
minor 6.1
year 2019
month 07
day 05
svn rev 76782
language R
version.string R version 3.6.1 (2019-07-05)
nickname Action of the Toes
@Rabbita Ah! We have several known issues with Windows file names that contain non-ASCII characters, such as #4469 and #5560. So this falls into this category, unfortunately. We'll be reviewing these as ew continue developing RStudio.
Still, the same problem, the dir contains some none English characters. OS version: Windows 10 R version: 3.6.1 Rstudio version: 1.2.5033Desktop editon
It would likely be safer for us to render the plot to a temporary file (no special characters), and then move the rendered file to the requested destination path.
It would likely be safer for us to render the plot to a temporary file (no special characters), and then move the rendered file to the requested destination path.
That sounds more robust to me. Does it have an impact on the performance side?
The main issue here would be that we'd be doing an extra filesystem copy (writing the image to one location, and then moving or copying to the requested location).
Activity
ronblum commentedon Jul 17, 2018
@uwemenzel Can you please provide a reproducible example? For example, does executing
from the console and saving with the default parameters reproduce the issue?
Jiachen-Ma-code commentedon Oct 14, 2019
I got the same issue from RStudio.
ronblum commentedon Oct 15, 2019
@Rabbita What environment are you using—specifically, RStudio version, R version, and operating system?
Jiachen-Ma-code commentedon Oct 16, 2019
R Studio Version 1.2.1335,
R:
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 3
minor 6.1
year 2019
month 07
day 05
svn rev 76782
language R
version.string R version 3.6.1 (2019-07-05)
nickname Action of the Toes
Jiachen-Ma-code commentedon Oct 16, 2019
@ronblum I figured it out. The saving dir contains none English characters, which simply fails the saving process.
ronblum commentedon Oct 17, 2019
@Rabbita Ah! We have several known issues with Windows file names that contain non-ASCII characters, such as #4469 and #5560. So this falls into this category, unfortunately. We'll be reviewing these as ew continue developing RStudio.
vitconkue commentedon Mar 9, 2020
Still, the same problem, the dir contains some none English characters.
OS version: Windows 10 R version: 3.6.1 Rstudio version: 1.2.5033Desktop editonjmcphers commentedon May 28, 2020
Can you give us the exact name of the dir that's causing trouble?
Jiachen-Ma-code commentedon Sep 5, 2020
Please try this one: "C:\Users\91319\Downloads\非英文路径"
kevinushey commentedon Sep 8, 2020
The problem here is likely in the way we invoke the graphics device function:
rstudio/src/cpp/r/session/graphics/RGraphicsPlotManager.cpp
Lines 373 to 382 in cbba1c0
It would likely be safer for us to render the plot to a temporary file (no special characters), and then move the rendered file to the requested destination path.
Jiachen-Ma-code commentedon Sep 11, 2020
That sounds more robust to me. Does it have an impact on the performance side?
kevinushey commentedon Sep 11, 2020
The main issue here would be that we'd be doing an extra filesystem copy (writing the image to one location, and then moving or copying to the requested location).
github-actions commentedon Feb 17, 2022
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs, per https://github.com/rstudio/rstudio/wiki/Issue-Grooming. Thank you for your contributions.
stale commentedon Mar 3, 2022
This issue has been automatically closed due to inactivity.
cz156 commentedon Feb 8, 2023
Then you will solve the problem.
uwemenzel commentedon Feb 8, 2023
Thanks a lot, cz156 !!