So we may have been talking about different versions. My last post used the current *devel* version of leoserver. Now I see that there is a felix-server branch in the leo-editor repo. So I fetched that and checked it out. It still doesn't work for me. I did notice that it opens a web page in my browser - nice touch, Felix - but that page doesn't actually work in the sense that you can't do the expression evals in the box at the top. With the browser debug tools I saw that the jquery script couldn't be downloaded. I haven't tried to find out why.
However, even though the http server continues to run, the vscode Leo extension window claims that the web socket is closed. I'd suggest that the web server side could be used to query the server to see if it thinks its websocket service side is still working. If I go back to Felix's own repo and use leobridgeserver.py from there, everything works as before. On Wednesday, June 9, 2021 at 4:50:40 PM UTC-4 [email protected] wrote: > I have updated my local repo devel branch from Leo's github rep. Now I > can run the leoserver.py file that's in the Leo repo. But, as Edward > reported, it doesn't actually work with leointeg. I get an announcement > that the extension is connected, but it's not. Sometimes when I try to > connect there is a message that it's already connected, but it still acts > like it is not. > > OTOH, when I start Felix's leobridgeserver from the leointeg directory, > then it works as I described earlier. > > BTW. after some of these failed attempts I had to close vscode and restart > it to get the whole mechanism working again. > > On Wednesday, June 9, 2021 at 4:13:08 PM UTC-4 Edward K. Ream wrote: > >> On Wed, Jun 9, 2021 at 2:49 PM Edward K. Ream <[email protected]> wrote: >> >>> >>> >>> On Wed, Jun 9, 2021 at 10:25 AM [email protected] <[email protected]> >>> wrote: >>> >>>> Here is the simplest, cleanest way I have found to get the extension >>>> working. I assume that the leo settings have already been set: >>> >>> >>> Thanks for this. We are getting close. It fails in leobridgeserver.py >>> because it can't import leo itself. This is expected. There should be a >>> simple fix that doesn't depend on Leo being on python's path. I'll report >>> on my proposed fix soon. >>> >> >> Hmm. Still no joy. I copied leobridgeserver.py to leo/core/leoserver.py >> to make sure they are identical. Then I added the following to leoserver.py: >> >> _path = __file__ >> _leo_path = os.path.abspath(os.path.join(__file__, '..', '..', '..')) >> print('leoserver.py::_leo_path:', _leo_path) >> if _leo_path not in sys.path: >> sys.path.append(_leo_path) >> >> Now the imports succeed, and the server runs as expected. However, >> nothing else happens and there is no obvious way to load a .leo file. >> >> Instead of this, perhaps leoInteg could ask for a path to Leo itself. >> >> Thomas, would you like to zoom with Félix and me when Félix is available? >> >> 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/5eda9a64-c5f2-4cf2-8c34-80c513d3507bn%40googlegroups.com.
