Error connecting Libreoffice from python using Uno on Windows

I am trying to run a python program that interacts with LibreOffice on windows 11

libreOffice is started headless.

  • LibreOffice 248.5.2
  • Python is 3.9 (to make sure it matches LibreOffice Python version)
  • Windows 11

The same code works fine on linux but on Windows it throws an exception on the instruction :
desktop = smgr.createInstanceWithContext(“com.sun.star.frame.Desktop”, ctx)
I get this error : “Binary URP bridge disposed during call”

  • I checked that the connection passes fine but the desktop instance cannot get created.
  • I made sure to import uno from LibreOffice - tried to have a timer after connection but still getting same error.
  • I tried the source code provided here how-to-use-libreoffice-api-uno-with-python-windows I

Still can’t figure out what is wrong and how to adapt to run my program to windows.

Any Ideas ?

OK so I solved the issue
Initially I wanted to stay on version 24.8 supposed to be more stable.
But I tried with last version 25.2 and it works fine.

So I still do not know what was the cause of uno not working.