Open alinemsm opened 8 years ago
Does this happen with any line? What version of Stata do you have (StataMP, StataSE, etc.)?
I have Stata/IC 13.1. It was working fine before the latest package update. Yes, it happens with whatever line I run.
It seems to be an error with your python version. Can you run
import sys; print(sys.version)
in your sublime console?
I get
>>> import sys; print(sys.version) 2.6.9 (unknown, Oct 23 2015, 19:19:20) [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)]
But I do have the latest python version installed. Can I point sublime to the other version?
I don't know how to change the python version in Sublime, but it's very easy to fix, and this way we can support Python 2.6 again. Please see this file: https://github.com/elbersb/SublimeStataEnhanced/blob/master/text_2_stata.py You can manually replace your local file with this file and then it should work again.
@andrewheiss I made a pull request for this.
@elbersb thanks for this!
I've done as you said and am getting
Unknown macro command text_2_stata
I can't possibly understand how this change produces this error message... Which version of Sublime are you using? I think in Sublime 3, Python 3 is used by default.
Sorry about the late reply. I use Sublime Text 2. I did a clean install in ST2 and the plugin and replaced the text_2_stata.py file by yours. Now am getting something similar to the previous error.
Writing file /Users/Al/Library/Application Support/Sublime Text 2/Packages/Stata Enhanced/text_2_stata.py with encoding UTF-8
Reloading plugin /Users/Al/Library/Application Support/Sublime Text 2/Packages/Stata Enhanced/text_2_stata.py
Writing file /Users/Al/Library/Application Support/Sublime Text 2/Packages/Stata Enhanced/text_2_stata.py with encoding UTF-8
Reloading plugin /Users/Al/Library/Application Support/Sublime Text 2/Packages/Stata Enhanced/text_2_stata.py
Traceback (most recent call last):
File "./sublime_plugin.py", line 362, in run_
File "./text_2_stata.py", line 168, in run
File "./text_2_stata.py", line 86, in get_stata_version
AttributeError: 'module' object has no attribute 'check_output'
This error is again related to the old Python version. It would be nice to support Python 2.6 completely, but I can't take care of this right now. If it's not possible to switch to Sublime 3, then maybe the easiest way is to install the old version of the plugin?
I am now using Sublime 3 and the plugin works well. Many thanks for your help!
Great! @andrewheiss Do you want to support Sublime 2? If not, this can be closed.
Can Stata Enhanced be used on Sublime Text 2 on Mac? Cmd + enter doesn't respond when I try executing the outside stata. I use StataMP.
Hi,
I'm getting the error below when sending a line to Stata. I'm using Stata 13.1 in Mac OSX.
Thank you!