Skip to content


Subversion checkout URL

You can clone with
Download ZIP


rmagic breaks on Windows #2533

filmor opened this Issue · 3 comments

3 participants


On Windows, whenever one executes a line of R code the kernel breaks and has to be restarted. The problem is IMHO two-fold:

  1. In this line of the sources the path is just pushed into a string in R, which then interprets the delimiter of c:\temp as an escape sequence (here one that indeed exists). If however it sees a sequence that does not exist, R will fail and take the kernel with it.
  2. The fact that the last part happens is another bug, but it might belong to rpy2 (it should just throw an exception instead of failing violently as it does).

As a temporary fix I convert all backslashes to forward slashes:

self.r('png("%s/Rplots%%03d.png",%s)' % (tmpd.replace("\\", "/"), png_args))

Have you got rpy2 working correctly on Windows? I thought that was currently an obstacle.


It's not so much, there is even a binary installer over here:

Just follow the instructions. You might need to fix the file of rpy2 that finds the binaries though, as it doesn't append your arch to the bin-path (that reminds me, need to report that ...)


Well, I'm glad to see someone's working on it. (To be clear, I don't need it myself, though)

@Carreau Carreau closed this in 13bc13e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.