-
Notifications
You must be signed in to change notification settings - Fork 51
Windows 7 Error: Can't open file py-src\ltmain.py #16
Comments
Same error here, on Windows Vista. However, the I confirm that the solution proposed by @tpgit works. |
I have same error, Windows 7, no spaces in path. And solution proposed by @tpgit does not work. :-( |
I perhaps should have mentioned that you need to re-compile python.cljs? So either build the entire plugin or just eval something in python.cljs (like run-py). |
Sorry, I don't even know what does it mean (recompile python.cljs). Pressing ctrl+enter in python.cljs results with message: We don't know what kind of client you want for this one. Try starting a client by choosing one of the I just wanted to run python scripts in LT. I don't know Clojure. |
I believe this means you should add a connection to Light Table UI (so it can display the results of the eval). Alternatively, without LT running, using the Command Prompt window, you could navigate to the root of the Python plugin, either \plugins\python or C:\Users\AppData\Local\LightTable\plugins\Python\ (the directory with a project.clj file in it) and run:
That should result in a newly modified python_compiled.js (and python_compiled.js.map) file. |
@pywkm I do not know Clojure, too. I just removed the call to On line 96, you find this:
Just replace it with:
And you should good to go. Quite the hacky way of doing it, I know, but it worked. |
gpiancastelli's fix worked for me. |
gpiancastelli's fix worked for me too 👍 |
i still haven't understood how and where exactly to find the plugin function mentioned by gpiancastelli. btw mine is windows xp. |
@mona24 you have installed LightTable in a directory somewhere, don't you. Go into that directory. That directory should contain a Open On that line, you should find the following text:
Replace it with the following text:
Start or restart LightTable, and you should be able to evaluate Python statement and programs from within it. |
i'm really really sorry. it still didn't work. i opened python_compiled.js with notepad and edited it as you told. i'm btw in the line that you mentioned the following text was there: (not lt.plugins.python.escape_spaces = (function On Sat, Jun 14, 2014 at 8:56 PM, Giulio Piancastelli <
|
@mona24 that's weird. I have that assignment on line 80. However. Forget line numbers. Just search the file for the text I said you would find on line 96. Then replace it with the other text. Save the file. Run LightTable. Oh, you should also forget about Notepad, too. |
This is now fixed in the 0.0.5 version of the python plugin. You can update from the plugin manager :) |
Thank you so much :) |
gpiancastelli's fix works. |
My user name on Windows 7 has a space char in it. When I attempt to evaluate a python statement I get the following error:
On Windows 7, calls to proc/exec should not wrap the args in quotes. In this case remove call to escape-spaces from https://github.com/LightTable/Python/blob/master/src/lt/plugins/python.cljs#L89
See Windows 7 "can't open file py-src\ltmain.py" error for details on why wrapping args in proc/exec calls is a bad idea even on Windows.
The text was updated successfully, but these errors were encountered: