randy3k / SendCode

Send code and text to macOS and Linux Terminals, iTerm, ConEmu, Cmder, Tmux, Terminus; R (RStudio), Julia, IPython.
MIT License
204 stars 28 forks source link

subprocess.CalledProcessError: Command 'C:\Users\<snip>\AppData\Roaming\ConEmu\ConEmuC.exe -GuiMacro:0 Paste(2,"options(error=traceback)")' returned non-zero exit status 134 #69

Closed taqtiqa-mark closed 7 years ago

taqtiqa-mark commented 7 years ago

Thanks for all your effort on these packages.

Details: Using SublimeText 3 (build 3143, 64 bit) Platform Windows 7 64bit SendCode master 7c8a27b SendCode User settings:

{
    "conemuc": "C:\\Users\\<snip>\\AppData\\Roaming\\ConEmu\\ConEmuC.exe",
    "prog": "cmder",
    "r":
    {
        "prog": "cmder"
    }
}

Action: Submitting an R command via Ctl+Enter provokes the following error from SendCode.

Result: The Code is sent to the R sessions running within Cmder. However, the command does not get submitted within the R session. That is, I have to switch to the Cmder/R prompt and hit return.

Traceback (most recent call last):
  File "C:\Users\<snip>\AppData\Roaming\SublimeText3\Data\Packages\SendCode\send_code.py", line 88, in <lambda>
    sublime.set_timeout_async(lambda: sender.send_text(cmd))
  File "C:\Users\<snip>\AppData\Roaming\SublimeText3\Data\Packages\SendCode\code_sender\sender.py", line 131, in send_text
    super(RCodeSender, self).send_text(cmd)
  File "C:\Users\<snip>\AppData\Roaming\SublimeText3\Data\Packages\SendCode\code_sender\sender.py", line 95, in send_text
    self.send_to_cmder(cmd)
  File "C:\Users\<snip>\AppData\Roaming\SublimeText3\Data\Packages\SendCode\code_sender\sender.py", line 54, in send_to_cmder
    send_to_cmder(cmd, conemuc, bracketed=self.bracketed_paste_mode)
  File "C:\Users\<snip>\AppData\Roaming\SublimeText3\Data\Packages\SendCode\code_sender\conemu\__init__.py", line 73, in send_to_cmder
    _send_to_conemu(cmd, conemuc, bracketed)
  File "C:\Users\<snip>\AppData\Roaming\SublimeText3\Data\Packages\SendCode\code_sender\conemu\__init__.py", line 93, in _send_to_conemu
    startupinfo=startupinfo)
  File "./python3.3/subprocess.py", line 547, in check_call
subprocess.CalledProcessError: Command 'C:\Users\<snip>\AppData\Roaming\ConEmu\ConEmuC.exe -GuiMacro:0 Paste(2,"options(error=traceback)")' returned non-zero exit status 134
randy3k commented 7 years ago

It's because you are not using the ConEmuC.exe for Cmder, that file is for ConEmu.

taqtiqa-mark commented 7 years ago

Apologies. will get an opportunity to check on Tuesday. Closing. Will reopen if required. Thanks again.

taqtiqa-mark commented 7 years ago

Hmm, when I use this as my settings file:

{
    "cmder": "C:\\Users\\<snip>\\AppData\\Roaming\\Cmder\\Cmder.exe",
    "prog": "cmder",
    "r":
    {
        "prog": "cmder"
    }
}

and I then try to submit some R code (ctl+enter), I see this in the ST3 console:

ConEmuC.exe not found. Specify the path to ConEmuC.exe in SendCode.sublime-settings.

When I add the ConEmuC path as shown earlier this error does not show, but I observe the behaviour described. Likewise if I have both cmder and conemu paths set I see the behaviour described in the OP.

Apologies in advance in case I have missed anything obvious.

randy3k commented 7 years ago

It should be the path to ConEmuC.exe not Cmder.exe or ConEmu.exe

taqtiqa-mark commented 7 years ago

I believe I have the path to ConEmuC.exe set in the OP?

randy3k commented 7 years ago

That is the ConEmuC.exe for ConEmu, not ConEmuC.exe for Cmder.

taqtiqa-mark commented 7 years ago

Apologies for being so dense - the Cmder stack is new to me. Again thanks for your efforts.