Apart from why this isn't working, it looks like the bridge should guard 
against receiving None here when it expected to get an actual commander; 
and an error message could be output as well.

On Friday, September 30, 2022 at 4:26:04 PM UTC-4 Félix wrote:

> Hmm.. that's weird... from your error message, it's in "leobridge" that it 
> fails, not in "leoserver".. i started a little investigation...:
>
> Only difference i can see (other than some plugins that could mess things 
> up) is that you're on linux+python 3.10.6 while I'm on linux and python 3.9
>
> *So i tried updating to python 3.10. (that gave me python 3.10.7 instead 
> of your 3.10.6)*
>
> so opening files with 3.10.7 on linux worked for me...! here's my output: 
>
> Launching server with command: python3.10 
> /home/felix/leo-editor/leo/core/leoserver.py --port 32125
>
> Starting LeoBridge Server 1.0.4 (Launch with -h for help)
> LeoServer: init leoBridge in 0.94 sec.
> LeoBridge started at localhost on port: 32125.
> Ctrl+c to break
> server: User Connected, Total: 1, Limit: 1
> Leo 6.7.0, master branch, build 4ef27fec07
> 2022-09-26 04:42:19 -0500
> Python 3.10.7, LeoGui: dummy version
> linux
> read outline in 0.14 seconds
> updating: @clean src/leoIntegration.ts
> read 37 files in 0.70 seconds
> read outline in 0.88 seconds
> read outline in 0.00 seconds
> read 1 files in 0.00 seconds
> read outline in 0.01 seconds
>
> Some things to test: 
>  - Does regular Leo open your same Leo file without problem?
>  - Maybe try to upgrade to python 3.10.7 (from your 3.10.6) 
>  - Maybe try to open some other Leo files, (do 'all' simple Leo files fail 
> on opening? or just a particular one?)  .. or do 'new Leo file' add to it, 
> ,  save it , then close and reopen it to see if it fails.
>  - Maybe try to switch your leo install to the* real  'master' branch 
> *instead 
> of the *pre-release '6.7.0' development version*, which may have 
> last-minute defects.
>
> *If you can open some other smaller/simpler leo files: (IF it does not 
> contain personal/touchy information)* Can you post you Leo file that you 
> tried to open that failed? (dont bother if you cannot even open a simple 
> test leo file with 'vanilla' content like a couple nodes with simple text 
> in body of nodes)
>
> Thanks for helping me debugging this weird failure of opening a Leo file 
> with leointeg! ( no pressure! ;) )
>
> Félix
>
> On Friday, September 30, 2022 at 6:18:00 AM UTC-4 jkn wrote:
>
>>
>> Hi Félix
>>
>> I made some progress: one one laptop, I managed to get things running 
>> using the 'direct install from vix'
>> approach. My main issue was actually upgrading my python to >3.9 so I 
>> could use a recent version of Leo...
>>
>> On my main desktop machine I seem to be having a little more trouble. I 
>> am already running python 3.10.
>> After starting/connecting to server etc, when loading a .leo file I get 
>> the following
>> (extracted from VSCodium output window):
>>
>> Thanks & Regards, Jon N
>>
>> Launching server with command: python3 
>> /home/jkn/leo-editor/leo/core/leoserver.py --port 32125
>>
>> Starting LeoBridge Server 1.0.4 (Launch with -h for help)
>> can not import leo.plugins.importers.occam        # JKN comment - not 
>> currently relevant I think
>> can not import leo.plugins.importers.occam
>> LeoServer: init leoBridge in 0.21 sec.
>> LeoBridge started at localhost on port: 32125.
>> Ctrl+c to break
>> server: User Connected, Total: 1, Limit: 1
>> Leo 6.7.0, 6.7.0 branch, build 4ef27fec07
>> 2022-09-26 04:42:19 -0500
>> Python 3.10.6, LeoGui: dummy version
>> linux
>>
>>
>> server: Unexpected Exception! 'NoneType' object has no attribute 'frame'
>> Traceback (most recent call last):
>>   File "/home/jkn/leo-editor/leo/core/leoserver.py", line 5178, in 
>> ws_handler
>>     answer = controller._do_message(d)
>>   File "/home/jkn/leo-editor/leo/core/leoserver.py", line 4467, in 
>> _do_message
>>     result = func(action, param)
>>   File "/home/jkn/leo-editor/leo/core/leoserver.py", line 4483, in 
>> _do_server_command
>>     return func(param)
>>   File "/home/jkn/leo-editor/leo/core/leoserver.py", line 1193, in 
>> open_file
>>     c = self.bridge.openLeoFile(filename)
>>   File "/home/jkn/leo-editor/leo/core/leoBridge.py", line 302, in 
>> openLeoFile
>>     g.app.windowList.append(c.frame)
>> AttributeError: 'NoneType' object has no attribute 'frame'
>>
>>
>> server connection finished.  Total: 0, Limit: 1
>> Shutting down leoserver
>> Closing Leo Server
>> Checking for changed commanders...
>> Stopped leobridge server
>>
>> On Thursday, September 29, 2022 at 8:07:10 PM UTC+1 Félix wrote:
>>
>>> Thanks J^n ! 
>>>
>>> Please post a screenshot of vscodium running leointeg if you feel like 
>>> it! i'm curious to see how other people use it (on various plat form and 
>>> editors! )
>>>
>>> Thanks again! :)
>>>
>>> Félix
>>>
>>> On Thursday, September 29, 2022 at 2:45:40 AM UTC-4 jkn wrote:
>>>
>>>> Thanks Felix, useful info about the server.
>>>>
>>>> I think I installed an earlier version 'directly' like you suggest 
>>>> here, but thought I'd try the 'seamless' method this time round.
>>>>
>>>> Happy to give it another go!
>>>>
>>>> Regard,s J^n
>>>>
>>>>
>>>> On Thursday, September 29, 2022 at 1:44:30 AM UTC+1 Félix wrote:
>>>>
>>>>> There were problems with microsoft's server last night, so you might 
>>>>> want to retry this.
>>>>>
>>>>> Also, you can download the extension itself t 
>>>>> https://marketplace.visualstudio.com/items?itemName=boltex.leointeg 
>>>>> use the link on the right (see below "Download Extension") 
>>>>> [image: Screenshot from 2022-09-28 20-37-43.png]
>>>>> And then user the command palette Ctrl+shit+P for the command "install 
>>>>> from vsix"
>>>>> [image: Screenshot from 2022-09-28 20-40-15.png]
>>>>> And then browse to the leointeg  VSIX extension file you've just 
>>>>> downloaded 
>>>>>
>>>>> Hope this helps for installing on VScodium! Please share a screenshot 
>>>>> when using it under this editor if it works! I'd be amazed to see it!!
>>>>>
>>>>> Thanks again for trying out LeoInteg and giving feedback!!!
>>>>>
>>>>> Félix
>>>>>
>>>>> On Wednesday, September 28, 2022 at 10:17:15 AM UTC-4 jkn wrote:
>>>>>
>>>>>> Hi Felix
>>>>>>     do you know if there are any issues in installing LeoInteg with 
>>>>>> VScodium
>>>>>> (https://github.com/VSCodium/vscodium,build of VSCode without 
>>>>>> tracking etc. )?
>>>>>>
>>>>>> I am very much a novice with VSCode/Vscodium; I tried CTRL+P and
>>>>>> "ext install boltex.leointeg", but get an error "Server returned 500"
>>>>>>
>>>>>> I have successfully installed a couple of VSCode plugins to VSCode, 
>>>>>> but I
>>>>>> don't know how much can be assumed...
>>>>>>
>>>>>> Thanks very much, J^n
>>>>>>
>>>>>> On Wednesday, September 28, 2022 at 10:55:20 AM UTC+1 Edward K. Ream 
>>>>>> wrote:
>>>>>>
>>>>>>> On Tuesday, September 27, 2022 at 10:39:46 PM UTC-5 Félix wrote:
>>>>>>>
>>>>>>> ...The biggest LeoInteg update ever! 
>>>>>>>>
>>>>>>>
>>>>>>>  Congratulations! vs-code updated leoInteg automagically. Everything 
>>>>>>> looks good.
>>>>>>>
>>>>>>> I am going to try leoInteg for my study of ocaml and mypy.
>>>>>>>
>>>>>>> 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/134d44bc-e9d3-4144-9458-a3b59636ee63n%40googlegroups.com.

Reply via email to