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

SendCode / Rice triggering python exception #5

Closed
pjcrosbie opened this issue Sep 10, 2017 · 2 comments
Closed

SendCode / Rice triggering python exception #5

pjcrosbie opened this issue Sep 10, 2017 · 2 comments

Comments

@pjcrosbie
Copy link

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

env:

  • windows x64
  • sublime & codesend, r-box
  • rice from pip install
  • python 3.6
  • R 3.4.1

test_rice-02.R

library(feather)     
library(data.table) 

action and notes

  • select all code in file test_rice-02.R

  • ctrl-enter to send selected code

  • ctrl-enter to send the selected code a second time (to trigger error)

  • the first time I send the code, works OK

  • rice prompt looks OK, i.e. I get r$> prompt so looks like it is ready for new input

  • the second time I send the code, I get exception shown

  • I can switch to console, press enter on last library(data.table) sent and processes OK

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
Copy link
Owner

randy3k commented Sep 10, 2017

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

@randy3k
Copy link
Owner

randy3k commented Sep 10, 2017

Actually, it was fixed earlier bcd3442.

EDIT: I was wrong.

@randy3k randy3k closed this as completed Sep 10, 2017
@randy3k randy3k reopened this Sep 10, 2017
@randy3k randy3k closed this as completed Sep 10, 2017
randy3k added a commit that referenced this issue Sep 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants