Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fail to transfer code to REPL by shortcut key #312

Open
renkun-ken opened this Issue · 7 comments

2 participants

@renkun-ken

I installed REPL in ST3 and set a shortcut key to evaluate code in a more convenient way

{
    "keys": [
        "ctrl+shift+enter"
    ],
    "args": {
        "scope": "selection"
    },
    "command": "repl_transfer_current"
}

I open a REPL windows in (for example) R, and edit a code file in R too. When I press the shortcut key nothing happens. I use the menu command to transfer the selected code to REPL and still nothing happens. I tried R, F#, Python and none of them work. I'm sure that I have perfectly correct installation of R, F#, and Python interpreter/compiler and set the correct PATH variable if needed. I wonder why this does not work?

@wuub
Owner

Turn on

   sublime.log_commands(True)

press ctrl+shift+enter and see if anything is logged in the console.

@renkun-ken

Thanks, @wuub! I tracked the command log. When I select the code and hit the shortcut I get this:

command: repl_transfer_current {"scope": "selection"}
Traceback (most recent call last):
File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 543, in run_
return self.run(edit, **args)
File "C:\Users\Kun\AppData\Roaming\Sublime Text 3\Packages\SublimeREPL\text_transfer.py", line 123, in run
for rv in manager.find_repl(external_id):
File "C:\Users\Kun\AppData\Roaming\Sublime Text 3\Packages\SublimeREPL\sublimerepl.py", line 437, in find_repl
if not (rv.repl and rv.repl.is_alive()):
File "C:\Users\Kun\AppData\Roaming\Sublime Text 3\Packages\SublimeREPL\repls\subprocess_repl.py", line 185, in is_alive
return self.popen.poll() is None
File "X/subprocess.py", line 916, in poll
File "X/subprocess.py", line 1131, in _internal_poll
OSError: [WinError 6] The handle is invalid

It seems that something wrong with the handle?

@wuub
Owner

Windows 8?

@renkun-ken

Windows 8.1.

I tried running ST3 as Administrator and it works occasionally but mostly it does not work.

@renkun-ken

It sometimes works for the first time in a ST session. If I close the REPL and open another one, the transfer no longer works and the log shows the same error information.

@wuub
Owner

Can you try this fork (using a portable ST3 installation) https://github.com/simonzack/SublimeREPL

@renkun-ken

I download a portable ST3 and download the https://github.com/simonzack/SublimeREPL fork and extract the contents to (ST3)/data/packages/user/SublimeREPL. I open Portable ST3 and it recognizes this package but all menu items are disabled.
How do I install a package from another fork?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.