[snap] Cannot use PyUno connector
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libreoffice (Ubuntu) |
Confirmed
|
Low
|
Unassigned |
Bug Description
It's not possible to use pyoo, which uses the Uno connector to Libreoffice, on a machine where the Libreoffice Snap is installed. The pyoo/Uno connector works fine with the libreoffice Apt packages.
To reproduce run this script:
#!/usr/bin/env python3
import pyoo
import subprocess
import time
import shlex
# PyOO needs a running Libreoffice process to do its work
lo_proc = subprocess.
time.sleep(3) # give Libreoffice time to actually start before trying to connect to it
lo_instance = pyoo.Desktop(
lo_instance.
Expected results (seen with the Libreoffice DEB-packages from Ubuntu): A new Calc window opens up showing a spreadsheet
Actual results:
$ ./test.py
Traceback (most recent call last):
File "/usr/local/
return resolver.
uno.NoConnectEx
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./test.py", line 10, in <module>
lo_instance = pyoo.Desktop(
File "/usr/local/
self.
File "/usr/local/
raise IOError(resolver, url)
OSError: [Errno pyuno object (com.sun.
Actual results if you specify the path to the soffice binary:
lo_proc = subprocess.
$ ./test.py
/snap/libreoffi
Traceback (most recent call last):
File "/usr/local/
return resolver.
uno.NoConnectEx
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./test.py", line 10, in <module>
lo_instance = pyoo.Desktop(
File "/usr/local/
self.
File "/usr/local/
raise IOError(resolver, url)
OSError: [Errno pyuno object (com.sun.
summary: |
- Cannot use PyUno connector with Libreoffice snap + [snap] Cannot use PyUno connector |
tags: | added: snap |
Changed in libreoffice (Ubuntu): | |
status: | New → Confirmed |
Changed in libreoffice (Ubuntu): | |
importance: | Undecided → Low |
The second error message is when specifying the exact path in the script like this: Popen(shlex. split(" /snap/libreoffi ce/current/ lib/libreoffice /program/ soffice --accept= \"socket, host=localhost, port=2002; urp;\" --norestore --nologo --nodefault"))
lo_proc = subprocess.