SendCode
SendCode copied to clipboard
R-Box: Send current line/selection -> SendCode: int too long to convert
Hi Thanks for all your effort on these packages.
Details:
Using SublimeText 3 (build 3143)
Platform Windows 7 64bit
RGui.exe: /cygdrive/c/Users/\<snip\>/AppData/Roaming/R/R-3.4.1/bin/x64/Rgui.exe
Note
The error is not raised when using RGui.exe: /cygdrive/c/Users/\<snip\>/AppData/Roaming/R/R-3.4.1/bin/i386/Rgui.exe
Action: Submitting an R command via R-Box provokes the following error from SendCode.
Result:
Traceback (most recent call last):
File "C:\Users\<>\AppData\Roaming\SublimeText3\Data\Packages\SendCode\send_code.py", line 79, in <lambda>
sublime.set_timeout_async(lambda: sender.send_text(cmd))
File "C:\Users\<>\AppData\Roaming\SublimeText3\Data\Packages\SendCode\text_sender\sender.py", line 125, in send_text
self.send_to_r(cmd)
File "C:\Users\<>\AppData\Roaming\SublimeText3\Data\Packages\SendCode\text_sender\sender.py", line 134, in send_to_r
send_to_r(cmd)
File "C:\Users\<>\AppData\Roaming\SublimeText3\Data\Packages\SendCode\text_sender\r\__init__.py", line 23, in send_to_r
winauto.paste_to_rgui(rid)
File "C:\Users\<>\AppData\Roaming\SublimeText3\Data\Packages\SendCode\text_sender\winauto.py", line 150, in paste_to_rgui
pasteid = get_menu_item_info(submenu, 1).wID
File "C:\Users\<>\AppData\Roaming\SublimeText3\Data\Packages\SendCode\text_sender\winauto.py", line 48, in get_menu_item_info
ret = GetMenuItemInfo(menu, index, True, ctypes.byref(info))
ctypes.ArgumentError: argument 1: <class 'OverflowError'>: int too long to convert
Is your sublime text also 64 bit?
Thanks for looking into this issue.
Yes ST is 64 bit, but nothing in the ST help indicates that. I know because I downloaded and install the portable ZIP archive for updates.
Can you try the current master to check if it fixes the issue or not?
Thanks for the quick response. I've downloaded master 7c8a27b
and unzipped this into the packages folder.
After a restart of ST# the ctl+enter functionality works :)
Many thanks again.
I'm running into this issue again. I note the line numbers are +1 compared to the original report.
Only points of difference on the system are:
- upgraded R to 3.4.3
- launched R from DOS cmd.exe
reloading plugin SublimeLinter-contrib-lintr.linter
SublimeLinter: lintr linter loaded
reloading plugin SublimeLinter-ruby.linter
SublimeLinter: ruby linter loaded
reloading plugin WordCount.WordCount
reloading plugin knitr.chunksend
reloading plugin SendCode.choose_prog
reloading plugin SendCode.send_code
reloading plugin SendCode.settings
reloading plugin SublimeLinter.commands
reloading plugin SublimeLinter.sublimelinter
plugins loaded
reloading settings Packages/User/Package Syncing.sublime-settings
Traceback (most recent call last):
File "C:\Users\<>\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\<>\AppData\Roaming\SublimeText3\Data\Packages\SendCode\code_sender\sender.py", line 125, in send_text
self.send_to_r(cmd)
File "C:\Users\<>\AppData\Roaming\SublimeText3\Data\Packages\SendCode\code_sender\sender.py", line 134, in send_to_r
send_to_r(cmd)
File "C:\Users\<>\AppData\Roaming\SublimeText3\Data\Packages\SendCode\code_sender\r\__init__.py", line 23, in send_to_r
winauto.paste_to_rgui(rid)
File "C:\Users\<>\AppData\Roaming\SublimeText3\Data\Packages\SendCode\code_sender\winauto.py", line 157, in paste_to_rgui
pasteid = get_menu_item_info(submenu, 1).wID
File "C:\Users\<>\AppData\Roaming\SublimeText3\Data\Packages\SendCode\code_sender\winauto.py", line 49, in get_menu_item_info
ret = GetMenuItemInfo(menu, c_long(index), True, ctypes.byref(info))
ctypes.ArgumentError: argument 1: <class 'OverflowError'>: int too long to convert
Package Control: No updated packages
Appreciate any help or fix.
Sendcode does not support cmd.exe. Try Cmder or Conemu instead.
Ouch, the problem with cmder is that I get path errors from R in some unpredictable circumstances. Will switch.
Any chance baun (bash) will be supported?
I am not sure what unpredictable circumstances you encountered, but in general, Cmder is favorable over the last-century-outdated-featureless cmd.exe
.
Agreed... Your speaking to an Linux refugee ;)
Hi, I ran into this issues again. This time after restarting an R session.
R: /cygdrive/c/Users/<redacted>/AppData/Roaming/R/R-3.4.3/bin/i386/Rgui
Sequence of events:
- Launch Rgui from Cmder.
- Long running R session. Send Code works fine.
- R runs out of memory (
cannot allocate memory block of size N Gb
) - Quit R session. Restart R from same Cmder window.
- Send Code works fine
- Repeat several times, approx. 4 times from memory.
- After restarting SendCode no longer works and the error below is reported
Let me know if you want this opened as a separate issue.
Traceback (most recent call last):
File "C:\Users\<redacted>\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\<redacted>\AppData\Roaming\SublimeText3\Data\Packages\SendCode\code_sender\sender.py", line 125, in send_text
self.send_to_r(cmd)
File "C:\Users\<redacted>\AppData\Roaming\SublimeText3\Data\Packages\SendCode\code_sender\sender.py", line 134, in send_to_r
send_to_r(cmd)
File "C:\Users\<redacted>\AppData\Roaming\SublimeText3\Data\Packages\SendCode\code_sender\r\__init__.py", line 23, in send_to_r
winauto.paste_to_rgui(rid)
File "C:\Users\<redacted>\AppData\Roaming\SublimeText3\Data\Packages\SendCode\code_sender\winauto.py", line 157, in paste_to_rgui
pasteid = get_menu_item_info(submenu, 1).wID
File "C:\Users\<redacted>\AppData\Roaming\SublimeText3\Data\Packages\SendCode\code_sender\winauto.py", line 49, in get_menu_item_info
ret = GetMenuItemInfo(menu, c_long(index), True, ctypes.byref(info))
ctypes.ArgumentError: argument 1: <class 'OverflowError'>: int too long to convert
Cloud you try it on the 64bit R GUI?