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

rmagic breaks on Windows #2533

Closed
filmor opened this issue Oct 30, 2012 · 3 comments
Closed

rmagic breaks on Windows #2533

filmor opened this issue Oct 30, 2012 · 3 comments
Milestone

Comments

@filmor
Copy link
Contributor

filmor commented Oct 30, 2012

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))
@takluyver
Copy link
Member

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

@filmor
Copy link
Contributor Author

filmor commented Oct 30, 2012

It's not so much, there is even a binary installer over here: https://bitbucket.org/breisfeld/rpy2_w32_fix/issue/1/binary-installer-for-win32

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 ...)

@takluyver
Copy link
Member

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

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
fix misinterpreted backslashes as escape-sequences by the R-interpreter.

Fixes ipython#2533
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants