Description: officehelper.bootstrap() method seeks for UNO_PATH environment variable which is not defined. This leads to invoke 'soffice' command in place of fully qualified 'Applications/LibreOffice.app/Contents/MacOS/soffice' command Steps to Reproduce: Run embedded Python interpreter or: 1. Install APSO extension 2. Run Python interpreter using APSO In above Python REPL console: 3. type 'import officehelper as oh' 4. type 'oh.bootstrap()' 5. wait a few seconds Actual Results: bootstrap() method raises a NoConnectException: - as this method does not detect the faulty command it spawns - as this method fails to connect to a missing process Expected Results: bootstrap() connects successfully to '.../soffice' process Reproducible: Always User Profile Reset: No Additional Info: In order to construct a fully qualified 'soffice' command bootstrap() method seeks for UNO_PATH environment variable that's missing in the context of macOS. - LO macOS build process may include an alias for 'soffice' that is mapped to its fully qualified name 'Applications/LibreOffice.app/Contents/MacOS/soffice'
I do not have a macOS machine to test it. However I got the same error running it on Kubuntu with the PPA installation of LO 7.6. I got: uno.com.sun.star.connection.NoConnectException It works on Windows... a pyuno object is returned.
Detailed explanations from: https://wiki.documentfoundation.org/Documentation/DevGuide/First_Steps#Getting_Started_2
Alain Romedenne committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/d8978a8c4ffabd6b36a691fd3e2df68563808234 tdf#116156 tdf#157162 tdf#159528 Fix glitches in officehelper.py It will be available in 24.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.