Felix - thanks for such a timely and comprehensive reply. I have come back 
from the future and remembered I labelled the directory with the creation 
date 7/21 rather than the Leo version number.... sad but true! I have 
installed the latest version of Leo

Leo 6.7.4
Python 3.11.4, PyQt version 6.5.2
Windows 10 AMD64 (build 10.0.19045) SP0


 and pointed Leointeg at it 

C:\Users\IH\AppData\Local\Programs\Python\Python311\Lib\site-packages\leo
 I left the python command empty as I assumed the 'py' for windows would be 
fine. 
That didn't work...
I then tried 
C:\Users\IH\AppData\Local\Programs\Python\Python311\Lib\site-packages\leo\core 
as that is where the server script actually lives. 
That didn't work  'can't find the server script'

I tried adding py to the Python command but that didn't work. 


When I run the server script manually I get:


Starting LeoBridge Server 1.0.6 (Launch with -h for help)
Traceback (most recent call last):

  File 
"C:\Users\IH\AppData\Local\Programs\Python\Python311\Lib\site-packages\leo\core\leoPlugins.py",
 
line 538, in loadOnePluginHelper
    __import__(moduleName)

  File 
"C:\Users\IH\AppData\Local\Programs\Python\Python311\Lib\site-packages\leo\plugins\livecode.py",
 
line 18, in <module>
    from meta import asttools

  File 
"C:\Users\IH\AppData\Local\Programs\Python\Python311\Lib\site-packages\meta\__init__.py",
 
line 2, in <module>
    from meta.decompiler.instructions import make_module

  File 
"C:\Users\IH\AppData\Local\Programs\Python\Python311\Lib\site-packages\meta\decompiler\__init__.py",
 
line 7, in <module>
    from meta.decompiler.instructions import make_module, make_function

  File 
"C:\Users\IH\AppData\Local\Programs\Python\Python311\Lib\site-packages\meta\decompiler\instructions.py",
 
line 9, in <module>
    from meta.decompiler.control_flow_instructions import 
CtrlFlowInstructions

  File 
"C:\Users\IH\AppData\Local\Programs\Python\Python311\Lib\site-packages\meta\decompiler\control_flow_instructions.py",
 
line 15, in <module>
    JUMP_OPS = [opcode.opmap[name] for name in JUMPS]
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File 
"C:\Users\IH\AppData\Local\Programs\Python\Python311\Lib\site-packages\meta\decompiler\control_flow_instructions.py",
 
line 15, in <listcomp>
    JUMP_OPS = [opcode.opmap[name] for name in JUMPS]
                ~~~~~~~~~~~~^^^^^^

KeyError: 'POP_JUMP_IF_FALSE'

LeoServer: init leoBridge in  1.1 sec.
LeoBridge started at localhost on port: 32125.
Ctrl+c to break

Having done this I tried connecting from VSCode and got the error websocket 
closed, code 1006

Hope some of that helps.

Ta like, 

IH
On Monday, 21 August 2023 at 18:14:05 UTC+1 Félix wrote:

> Hi Israel, 
>
> I'm Félix, the creator of LeoInteg. I'm glad to have people tryout 
> LeoInteg! Thanks for giving it a try!! :)
>
> I've successfully ran leointeg on many oses without any fuss, (windows, 
> ubuntu, and even raspberry pi on a PI 3) using the simple commands shown 
> here :  (*But I know sometimes it's not that simple or easy - so I'll try 
> to help you out !*)
> [image: testscreen2.png]
>
> First things first, to get you going, I gotta ask: *what is this Leo 7.21 
> that you speak of*? Are you from the future? 😅 the latest Leo is 6.7.4! 
> (or 6.7.5 in development) Please take a screenshot of your Leo window at 
> startup so we can see what you see here: 
> [image: Screenshot from 2023-08-21 12-36-24.png]
> Next, take a screenshot of your LeoInteg Settings, which you can see if 
> you use the "Welcome" command from LeoInteg in VSCode. (press F1 or 
> Ctrl+shift+P to open the command palette, and start typing "Leo Welcome" to 
> see the command and press enter) So that we can wee what you have setup, 
> the screen looks like this (the important sections are "Leo-Editor Path" 
> and "Python Command" ):
> [image: Screenshot from 2023-08-21 12-39-47.png]
> When you setup the options and press 'start server' on the LEO INTEGRATION 
> panel on the left, you will see something like this in the Leo Output panel:
> (Note: This command line is built with the options you put in the settings 
> above)
> [image: testoutput-leo-leo.png]
>
> Obviously you may get the error instead of a "success" but at least you 
> will see what command LeoInteg tried to launch the server with. Please 
> provide it in you reply so we can see, and diagnose a bit more.
>
> Another good test that I would suggest, is to manually start the server to 
> get better error messages : In a terminal, navigate to your Leo-Editor 
> installation folder, then 'cd' into the /leo-editor/leo/core/ folder. Then, 
> try to launch the leoserver.py script directly as such: 
>
> On my linux machine I can start it like this: python3.10 leoserver.py
> On my windows machine i start it like this: py leoserver.py.
>
> Try to see if you can start the server by launching it manually instead of 
> automatically with LeoInteg, What does that do? Is it possible to start it 
> successfully this way?
>
> If it works you can then try connecting with leointeg with the 'Connect' 
> button in the Leo Integration panel on the left. (no need to 'start' a 
> server with leointeg if you started one manually.) And note what command 
> you used in order to setup the settings in Leo's welcome screen properly. 
> (perhaps you need to specify the python command as "py", "python", 
> "python3" or "python3.11" or "python3.10" depending on what your setup is 
> on your machine. Perhaps your "Leo-Editor" path was wrong. Or perhaps the 
> websockets were installed on another python installation on your machine, 
> different than the one that is used by leointeg when it tries to start the 
> server itself. (in case you have many python installed on your machine, 
> that is...)
>
> (another possibility is websockets not installed properly) 
>
> When installing websockets with *'pip install websockets'*, make sure 
> you're installing it to the right python installation that you intend to 
> run the server with. (in case you have many python installations on your 
> machine in various folders, like python2, python3. etc. or, with annaconda 
> wich can let people use many different python installations on their 
> machines.)
>
> I've got to go now but i'll try later on my windows machine which also has 
> python 3.11 like you have. In the meantime please try some of the stuff I 
> suggested and (much importantly) *take screenshots because often times it 
> helps to spot something that you didn't think of mentionning! *
>
> Thanks again for trying out LeoInteg!! 
>
> Please provide feedback and screenshots so that we can help you out in 
> figuring why it didn't work on you machine! :)
>
> Félix
>
> On Monday, August 21, 2023 at 6:26:16 AM UTC-4 Israel Hands wrote:
>
>> I've just run the installer for pyqt6 from the python 3.11.4 directory 
>> and Leo now works again. School boy error. But Leointeg still fails -I'm 
>> running Leo 7.21 - maybe that needs an update?
>>
>> ta
>>
>> IH
>>
>> On Monday, 21 August 2023 at 11:00:10 UTC+1 Israel Hands wrote:
>>
>>> Everyone now and then I upgrade something and I always find it harder 
>>> than I should. That's my fault. So when I saw Ed's advice about installing 
>>> Leointeg as the easiest way to go I thought - 'I'll give that a try'
>>>
>>> And so I installed Leointeg - I'm running Leo 7.21 on Windows 10. And 
>>> then I turned to websockets and thought maybe I ought to upgrade my Python 
>>> install from 3.7. 
>>>
>>> Strangely (or maybe not) before upgrading if ran the comman python from 
>>> the command line Windows would complain about not finding python. But if I 
>>> ran py all was well. 
>>>
>>> Anyway - I installed Python 3.11.4 and then pip and then websockets and 
>>> then tried running Leointeg but got the same error message I had before I 
>>> installed websockets. 
>>> Leo server exited with code 1. 
>>> I then wondered what version of Python Leo was looking at so I started 
>>> Leo as per normal, which failed with:
>>>
>>> Can not load pyQt5 or pyQt6
>>>
>>> Can not Import Qt
>>>
>>> I now don't feel so good!
>>>
>>> ta
>>>
>>> IH
>>>
>>

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/dc2b1a8a-5184-4f33-a22d-077253b5bf33n%40googlegroups.com.

Reply via email to