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

IRkernel doesn't work with CRLF line endings #312

Closed
econwang opened this issue Jun 26, 2016 · 13 comments
Closed

IRkernel doesn't work with CRLF line endings #312

econwang opened this issue Jun 26, 2016 · 13 comments
Assignees
Labels
language specific Not universal in all languages

Comments

@econwang
Copy link

thanks for providing this, very useful, I do use it with python and stata, but with R, as suggested by the readme, it should work with IRKernel, if I only select one line, it works well, but when select multi lines or the whole file, it shows:

Error in parse(text = x, srcfile = src): <text>:2:33: unexpected input
1: # test IRkernel
2: x <- seq(0, 2*pi, length.out=50)
                                   ^
Traceback:

the r code is:

x <- seq(0, 2*pi, length.out=50)
plot(x, sin(x))
@n-riesco
Copy link
Collaborator

I'm sorry for the delay in replying.

Could you open the dev console (by pressing shift-ctrl-i) and post an screenshot? This will help us debug the issue.

@igutierrezm
Copy link

I have the same problem. Here is the dev console. Help me please! :)

captura de pantalla 2016-09-16 14 54 41

@lgeiger lgeiger added the language specific Not universal in all languages label Sep 22, 2016
@lgeiger
Copy link
Member

lgeiger commented Sep 22, 2016

Are you using the latest version of the IRkernel?

@igutierrezm
Copy link

yes

@lgeiger
Copy link
Member

lgeiger commented Sep 22, 2016

Hmm this is strange, on the Hydrogen side everything looks normal. I bet it has something to do with the line endings. Could you try running

x <- 1;
y <- x + 1;

I don't have IRkernel on my machine so I can only guess at the moment.

@igutierrezm
Copy link

same result :(

captura de pantalla 2016-09-22 16 42 40

@lgeiger
Copy link
Member

lgeiger commented Sep 22, 2016

I'll try to get a r kernel running on my windows VM so I can debug it.

@lgeiger lgeiger self-assigned this Sep 22, 2016
@igutierrezm
Copy link

thank you very much :)

@lgeiger
Copy link
Member

lgeiger commented Sep 22, 2016

OK I can reproduce this.

@lgeiger
Copy link
Member

lgeiger commented Sep 22, 2016

IRkernel doesn't like windows style line endings.

There is a easy fix for that: Click on CRLF in the status bar and select LF. This will switch to unix style line endings.

@rgbkrk @n-riesco Should we ensure unix style line endings before sending code to a kernel or should this be handled by the kernel itself?

@igutierrezm
Copy link

It works! Thanks!

@rgbkrk
Copy link
Member

rgbkrk commented Sep 22, 2016

Interesting. I don't think that's specified anywhere in the messaging spec. I'll raise an issue on jupyter-client.

@lgeiger lgeiger changed the title error when run multiline code with IRkernel IRkernel doesn't work with CRLF line endings Sep 22, 2016
@lgeiger
Copy link
Member

lgeiger commented Sep 23, 2016

@igutierrezm In the next release this will be fixed so you can use CRLF line endings again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language specific Not universal in all languages
Projects
None yet
Development

No branches or pull requests

5 participants