Hi all :)

First - make sure you ran 'npm install' in leointeg's project folder to 
fetch any new dependencies that may have been updated since last time.

Second - (most important) specify how you want to start the server, 
otherwise it's hard to help and give instructions :* There are 3 ways to 
start the leobridgeserver while in developement* - (by vscode itself to 
debug it while it runs, by leointeg itself using the command string in its 
options settings, or starting it yourself in a terminal) after the release, 
there will be only 2 ways (unless running in debug) 

So to specify this,  goto the debug view of vscode, (the triangle with the 
bug)  right at the top you have to choose what you want to debug (and what 
will be started by vscode itself)*  the extension, the server, or both*. 

If you want vscode to start the server , (*like in Edwards original post in 
this thread I presumed from his description*) then it's vscode's own python 
development settings that will decide how it starts it. (users using v1.0 
will not be using this method) So leointeg has nothing to do with it.

If you choose to have leointeg start the server itself, choose "run 
extension" only,  in the top debug dropdown. (equivalent with the real 
finished product,) then  start with F5, then, in the extension host that 
just popped and runs leointeg, open the leointeg settings panel and select 
'start server automatically', (and later come back here to also set the 
python launch string if you need something other than 'python' on linux and 
'python3' on windows. (you may need to close the extention host and hit F5 
again to restart after setting the options if you want to actually see 
leointeg start it by itself. ) 

On the other hand, after starting leointeg with F5, there are buttons in 
leo's main outline panel to start the server  and / or connect to it. 
(regardless if started automatically or not) 

Another (third)  way to start the server, is to simply start the 
leobridgeserver.py script in a terminal program of your choice.

To access leointeg's  settings (while running leointeg in the extention 
host) use ctrl+shift+P to open the command palette  and start typing leo 
settings (or leo welcome) to access the leointeg options. (to set your 
python command line option for when you want leointeg to start the server 
itself) 

I know it wont help you, hehe,  but on both my windows and linux machines, 
everything works without any special settings / string with my vanilla 
installations of python. (I'm not a python expert who has many 
pythons/anaconda/etc...) 

*Note: the leointeg welcome/settings webview are not visible in your 
regular window of vscode, because it's generated by leointeg - so its only 
available and visible in the extension host window that opens once you 
press F5. *
--
Félix 





On Tuesday, June 8, 2021 at 4:24:34 PM UTC-4 [email protected] wrote:

> I still can't get it working.  It's using my cmd file to set the right 
> PYTHONPATH before running Python.  I don't get any error messages when 
> things get launched.  But connection attempts fail.  The only message is 
>
> Leo Bridge Connection Failed: Websocket closed, code: 1006
>
> On Tuesday, June 8, 2021 at 3:43:54 PM UTC-4 [email protected] wrote:
>
>> That sets the python version for vscode, but it didn't seem to set it for 
>> leointeg.  There is some setting for leo-integ where you can set it.  I've 
>> found it twice, but I still don't actually know how to get to the setting.  
>> But it's there.
>>
>> I still haven't gotten leointeg to run, though.
>>
>> Once I start the Leo Bridge from a console, how do I know it's still 
>> running and how do I stop it?
>>
>> On Tuesday, June 8, 2021 at 3:23:26 PM UTC-4 [email protected] wrote:
>>
>>> I found out how to get VScode to run a particular file for the Python 
>>> command:
>>>
>>> " Under the view menu select 'show command pallet'. One of the commands 
>>> you can then select from the command palette is 'Python: Select 
>>> Interpreter'. Selecting this option will allow you to choose which version 
>>> of python to use."
>>>
>>> (from 
>>> https://stackoverflow.com/questions/48135624/how-can-i-change-python-version-in-visual-studio-code
>>> )
>>>
>>> To actually find this command I used the search line, otherwise 
>>> scrolling through all the commands would have been a chore.  I needed to do 
>>> this so I could set PYTHONPATH to point to my Leo git repo. I wrote a 
>>> little cmd file to do it.
>>> On Tuesday, June 8, 2021 at 12:42:38 PM UTC-4 Edward K. Ream wrote:
>>>
>>>> On Tue, Jun 8, 2021 at 11:19 AM [email protected] <[email protected]> 
>>>> wrote:
>>>>
>>>>> That setting is from Windows, not vscode.  I get that same error if I 
>>>>> try to run "python3", even though I have 3.9 installed.  
>>>>
>>>>
>>>> I tried creating a python3.bat file, but that didn't work. I already 
>>>> had a python.bat file.
>>>>  
>>>>
>>>>> I think that leointeg must be asking for python using some name that 
>>>>> triggers the response from windows.  I went to that Windows setting 
>>>>> location, and I could turn off the offer to get Python3.9 from the 
>>>>> Microsoft store, but then there would probably be nothing th launch by 
>>>>> that 
>>>>> name.
>>>>
>>>>
>>>> The message said it was trying to execute `python`, so python.bat 
>>>> should work.
>>>>
>>>> Edward
>>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/8ae6cbb8-fdc9-4d02-8ca4-e692fc3308c7n%40googlegroups.com.

Reply via email to