randy3k / radian

A 21 century R console
MIT License
2k stars 76 forks source link

SendCode / Rice triggering python exception #5

Closed pjcrosbie closed 7 years ago

pjcrosbie commented 7 years ago

Hi. Here is a simple example of the errors I am seeing.

env:

test_rice-02.R

library(feather)     
library(data.table) 

action and notes

Trying different combinations of sending code can crash rice/conemu completely requiring me to kill process.

I have tried the same scenario plan R console and no issues.

Once I get the exception from the SendCode to rice scenario it is possible, but intermittently, to get same exception by just directly executing code in rice, i.e. without any SendCode use. However, haven't been able to get same exception by just starting a clean rice session and interacting directly with it, i.e. never use SendCode.

conemu/rice console output: this is the output from new clean rice session and using SendCode from sublime as described above

[rice] [R] [java] D:\wspace\rice-eg > rice
R version 3.4.1 (2017-06-30) -- Single Candle
Platform: x86_64-w64-mingw32

r$> library(feather)

r$> library(data.table)
data.table 1.10.4
  The fastest way to learn (by data.table authors): https://www.datacamp.com/courses/data-analysis-the-data-table-way
  Documentation: ?data.table, example(data.table) and browseVignettes("data.table")
  Release notes, videos and slides: http://r-datatable.com

r$> library(feather)

Unhandled exception in event loop:
  File "b:\python\anaconda3_4.3.1\envs\rice\lib\site-packages\rice\deps\prompt_toolkit\eventloop\coroutine.py", line 79, in step_next
    new_f = coroutine.throw(exc)
  File "b:\python\anaconda3_4.3.1\envs\rice\lib\site-packages\rice\deps\prompt_toolkit\buffer.py", line 1550, in new_coroutine
    yield From(coroutine(*a, **kw))
  File "b:\python\anaconda3_4.3.1\envs\rice\lib\site-packages\rice\deps\prompt_toolkit\eventloop\coroutine.py", line 81, in step_next
    new_f = coroutine.send(f.result())
  File "b:\python\anaconda3_4.3.1\envs\rice\lib\site-packages\rice\deps\prompt_toolkit\buffer.py", line 1425, in async_completer
    completions = list(completions)
  File "b:\python\anaconda3_4.3.1\envs\rice\lib\site-packages\rice\completion.py", line 34, in get_completions
    app = get_app()
  File "b:\python\anaconda3_4.3.1\envs\rice\lib\site-packages\rice\deps\prompt_toolkit\application\current.py", line 47, in get_app
    return DummyApplication()
  File "b:\python\anaconda3_4.3.1\envs\rice\lib\site-packages\rice\deps\prompt_toolkit\application\dummy.py", line 18, in __init__
    super(DummyApplication, self).__init__(output=DummyOutput(), input=DummyInput())
  File "b:\python\anaconda3_4.3.1\envs\rice\lib\site-packages\rice\deps\prompt_toolkit\application\application.py", line 208, in __init__
    mouse_support=mouse_support)
  File "b:\python\anaconda3_4.3.1\envs\rice\lib\site-packages\rice\deps\prompt_toolkit\renderer.py", line 269, in __init__
    self.reset(_scroll=True)
  File "b:\python\anaconda3_4.3.1\envs\rice\lib\site-packages\rice\deps\prompt_toolkit\renderer.py", line 293, in reset
    self.output.scroll_buffer_to_prompt()

Exception 'DummyOutput' object has no attribute 'scroll_buffer_to_prompt'
Press ENTER to continue...r$> library(data.table)
Press ENTER to continue...
r$> library(data.table)
randy3k commented 7 years ago

Thanks for the bug report. It is very useful, will fix soon.

randy3k commented 7 years ago

Actually, it was fixed earlier bcd344241fd21bab99b3ef2bfac80d4ffaec04ea.

EDIT: I was wrong.