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

No output printed on console. #1916

Closed
imkdoug opened this issue Jan 5, 2018 · 12 comments
Closed

No output printed on console. #1916

imkdoug opened this issue Jan 5, 2018 · 12 comments
Labels
console encoding info needed Additional information requested—reprex, steps, open question, etc.

Comments

@imkdoug
Copy link

imkdoug commented Jan 5, 2018

Hi,

I got stuck some problem with RStudio.

  1. I read and made data with Korean, still everything is OK
    image

  2. after running some script, console shows nothing. there's no output printed. even no error comments.
    image

  3. but, console is working!
    image
    after allocating a vector, I could find the vector on the "Environment" board,
    but I couldn't get the value via console.

image

  1. What I tried is kind of shock therapy.
    image
    at the red point, I changed project encoding by 'Project options' menu, and console works well!

but, after running some command,
image

the problem occurred again.

With same file and script, there was no problem with previous RStudio.
I tried some trials like changing path, but I couldn't find why.
Because there's no problem with data in English only, I could be some encoding error.

I attached diagnostics report.
If you need more information, please let me know.

Thanks!!

diagnostics-report.txt

More information.

I found some interest thing. It's a script(.R)-wise error!
If I open another script on same project, and run some command, then it works!

@jmcphers
Copy link
Member

jmcphers commented Jan 5, 2018

You mentioned that this only happens for some .R scripts. Can you paste (or send as e.g. a github gist) one which consistently reproduces the problem for you?

@jmcphers jmcphers added info needed Additional information requested—reprex, steps, open question, etc. encoding labels Jan 5, 2018
@imkdoug
Copy link
Author

imkdoug commented Jan 6, 2018

Sure. I attached the script and CSV file.
data and script include Korean. but that could be reason, so I didn't touch it.
Thanks.

script_and_data.zip

Also, I don't know whether this is from same problem or not,
something when I work with Korean, I got broken popup like this.
image

@hyk0127
Copy link

hyk0127 commented Jun 24, 2018

I know it's been a while since the original question was posted, but since I couldn't find an answer anywhere that solved my problem and that took me to a few hours of agony, here goes.

I had the exact same error, while dealing with data involving Korean characters; all of a sudden (even without running a complicated code) the console window would not show any output. Crazy thing is, any console output wouldn't show, yet the result of any code that I'd run would be stored.. for example run a<-1 and then in the environment window you'd see value of a changing to 1.

I checked everything from packages, memory load, different codes (any code, basically, would give me the error after a few lines) and whatnot, but nothing would solve it.

What worked in the end is, per my great friend's suggestion, to try opening a new script in the form of R Notebook, then in a code chunk run any simple code (i.e. 1+1). Then the output appears in the console window, and then even if I go back to my original script and run different codes, the console window shows all the output without problem.

I still don't know how and why this works and my friend's answer was that it was a 'hunch'. So take it with a grain of salt, but it might be worth it to try this.

@imkdoug
Copy link
Author

imkdoug commented Jun 24, 2018

Hey there,

I forgot everything about this, but I think I found a solution.
Maybe it's was some error on script.

unlike English, Korean combines alphabet to make a single letter.
But RStudio is not so good at Korean, so there could be some misunderstandings.

Anyway, I re-typed all the script( NOT COPY-PASTE).
and then, there's no problem. try it.

@kevinushey
Copy link
Contributor

I'm not sure if it's relevant in the cases here, but we've had some somewhat similar reports from Korean users who were using the Anaconda builds of R with RStudio. Could that be true in your case as well?

All in all, we'll need a reproducible example in order to find and isolate the cause of this issue, and develop a fix.

@efreer20
Copy link

efreer20 commented Jul 9, 2018

@hyk0127 That solution worked for me! Thanks!!

@imkdoug
Copy link
Author

imkdoug commented Jul 9, 2018

We found some temporary solutions, and it could help you @kevinushey

  1. "Reload" console
  2. "Restart R Session"
  3. change encoding at "Project Options"
  4. run another simple script as told by hyk0127

If this happens with only Korean, there's some suspicious thing.
Unlike other languages, Korean combines 2~3 alphabet to make a letter, and letters make a word.

for example, a word "개발" which means development consists of two letters "개", "발".
"개" is a combination of 2 alphabet 'ㄱ' and 'ㅐ',
'발' is of 3 alphabet 'ㅂ', 'ㅏ', 'ㄹ'.

Though we can use Korean on RStudio, but still RStudio don't know about Korean.
so there's some problem.

image

everything looks fine, but look at the cursor. I finished making the second letter, but cursor is still positioned below the second.
and if I click another in this situation,

image

the second becomes broken. and then if I pus "Tab",

image

the second appears!

there's another similar situation.

image

we can use "$" and "Tab" for autocompletion.
but, the result follows.

image

So, I thinks these 'Incomplete Korean' feature can cause this error.
I hope this can help you all.

@hyk0127
Copy link

hyk0127 commented Jul 10, 2018

Thanks everyone for their input; let me put another two cents.

When I faced this problem I ran some frantic google searches. The impression that I got was that there are not one but a few problems that people face when using Korean data / codes. For example, for me the solutions

  1. "Reload" console
  2. "Restart R Session"
  3. change encoding at "Project Options"

all did not work, yet I saw on the aforementioned google search quite a few users who solved their own problems with those methods. For me, only the fourth option worked.

Unfortunately I have eventually erased the code away.. but if I do encounter the same problem I will try to preserve and provide a reproducible example.

In the meanwhile, what was suggested by @imkdoug makes a lot of sense to me, since I noticed the same phenomenon where after typing in a certain code in Korean, such as "개발", if I move the cursor using the space key or the arrow key the code stays fine but if I click on another part of the code (without pressing space/arrow key first) then the Korean writing crumbles, just like what @imkdoug showed.

Again, thanks everyone for the inputs.

@o-fu
Copy link

o-fu commented Mar 22, 2019

I am using Japanese characters in my code and encountered similar problem.
My phenomenon was exactly the same as described by @hyk0127.
Executing simple codes from R markdown, as suggested, solved the problem, but I look forward to a permanent fix will made in RStudio's future versions.

@skylics
Copy link

skylics commented May 21, 2019

I also had same problem couple of times before and my conclusion is that the problem is caused when Korean character column names is used with lazy-evaluation like some of functions in dplyr package.
For me all 4 methods mentioned above was all temporary, and when i changed my Korean column names in to Eng, it was solved....

@ronblum
Copy link
Contributor

ronblum commented Dec 16, 2019

Would one of you be willing to provide some sample code? A simple example would be find. You can place it between a pair of three ticks (```) , e.g.

```
x <- 1
```

@jmcphers
Copy link
Member

No response in months, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
console encoding info needed Additional information requested—reprex, steps, open question, etc.
Projects
None yet
Development

No branches or pull requests

8 participants