Python macros code rises fatal error:
import uno
def test_https_connection():
"""Creates a new writer document and do GET request to "www.python.org"."""
ctx = uno.getComponentContext()
smgr = ctx.ServiceManager
desktop = smgr.createInstanceWithContext("com.sun.star.frame.Desktop", ctx)
# open a writer document
doc = desktop.loadComponentFromURL(
"private:factory/swriter", "_blank", 0, ())
from http.client import HTTPSConnection
host = "www.python.org"
# OpenSSL: FATAL OPENSSL_Uplink(00007FFBD7B61D50,08): no OPENSSL_Applink
conn = HTTPSConnection(host)
conn.request("GET", "/")
r1 = conn.getresponse()
text = doc.Text
cursor = text.createTextCursor()
text.insertString(cursor, f"{host}:{r1.status}:{r1.reason}\n", 0)
g_exportedScripts = test_https_connection,
Version: 7.4.5.1 (x64) / LibreOffice Community
Build ID: 9c0871452b3918c1019dde9bfac75448afc4b57f
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL
HTTPSConnection(“www.python.org”) works fine in another interpreter.