Created attachment 153473 [details] Connect to LO server, and print `CurrentComponent.CurrentSelection` I need to programmatically focus a slide in Slides pane, so I could copy the slide. However, it seems like selection of the slide does not influence the Selection property. # Steps to reproduce 1. Run `soffice --impress --accept="socket,host=localhost,port=2002;urp;StarOffice.ServiceManager"`, and dismiss "Select a Template" window. 2. There should be a pane titled "Slides" on the left with a single slide. Click it. (note, how Edit → Copy menu was grayed out before, and became available afterwards, which means you succeeded in selecting the slide) 3. Execute attached `test.py` script, which prints the currently selected object. ## Expected Something different from `None` ## Actual It prints: None # Additional information For background see also: https://ask.libreoffice.org/en/question/205218/uno-how-to-focus-a-slide/ https://ask.libreoffice.org/en/question/204747/uno-copy-a-slide-between-2-impress-documents/
I get Traceback (most recent call last): File "test.py", line 14, in <module> print(desktop.CurrentComponent.CurrentSelection) __main__.RuntimeException: Binary URP bridge disposed during call Arch Linux 64-bit Version: 6.5.0.0.alpha0+ Build ID: 7e403195e574be5174815a51cf5c42f06f76a87a CPU threads: 8; OS: Linux 5.3; UI render: default; VCL: kf5; Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US Calc: threaded Built on 1 December 2019
(In reply to Buovjaga from comment #1) > I get > Traceback (most recent call last): > File "test.py", line 14, in <module> > print(desktop.CurrentComponent.CurrentSelection) > __main__.RuntimeException: Binary URP bridge disposed during call > > Arch Linux 64-bit > Version: 6.5.0.0.alpha0+ > Build ID: 7e403195e574be5174815a51cf5c42f06f76a87a > CPU threads: 8; OS: Linux 5.3; UI render: default; VCL: kf5; > Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US > Calc: threaded > Built on 1 December 2019 Apparently, this is a separate regression in 6.5. I looked at the script, it's pretty short, and it doesn't seem to do anything invalid. On 6.3.3 I currently have the script prints "None".
Hi Konstantin, is this issue still reproducible with a daily build from http://dev-builds.libreoffice.org/daily/master/ ? You can install it alongside the standard version. I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the master build
(In reply to Xisco Faulí from comment #3) > Hi Konstantin, > is this issue still reproducible with a daily build from > http://dev-builds.libreoffice.org/daily/master/ ? > You can install it alongside the standard version. > I have set the bug's status to 'NEEDINFO'. Please change it back to > 'UNCONFIRMED' if the bug is still present in the master build Hi! Hmm, this would be a bit hard to test, because I'm on Arch and your link has no Archlinux package. I could unpack rpm or deb package, and then run the unpacked binary, will it work? I'm unsure as I'd guess it may use the system LO libraries instead of the unpacked ones. But if yes, I could try it. I wonder, are you asking out of pure curiosity, or do you have some reason to believe it may have been fixed?
You could try an appimage of 7.0 beta: https://libreoffice.soluzioniopen.com/index.php/7-0-pre-releases/ You only set it to be executable and then run the file.
(In reply to Buovjaga from comment #5) > You could try an appimage of 7.0 beta: > https://libreoffice.soluzioniopen.com/index.php/7-0-pre-releases/ > You only set it to be executable and then run the file. Thanks! I tested it, I get the same output `Binary URP bridge disposed during call` as in comment 1. So I don't think we can check whether it's been fixed as there's still that.
Ok, I confirmed the printed None with older commits while I was bibisecting the regression. Regression filed as bug 134106
Dear Konstantin Kharlamov, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
So, I am trying to repro this again, and I'm getting the following error: Traceback (most recent call last): File "/tmp/test.py", line 1, in <module> import uno File "/usr/lib/python3.12/site-packages/uno.py", line 19, in <module> import pyuno ModuleNotFoundError: No module named 'pyuno' Note: I am importing `uno`, however the error goes from the LibreOffice internals about "pyuno" instead. I made a file search for a file named "pyuno"¹ in the sources and LO repo has none. I presume this is a new bug on the LO side…? 1: https://github.com/search?q=repo%3ALibreOffice%2Fcore+path%3A**%2Fpyuno*&type=code
(In reply to Konstantin Kharlamov from comment #10) > So, I am trying to repro this again, and I'm getting the following error: > > Traceback (most recent call last): > File "/tmp/test.py", line 1, in <module> > import uno > File "/usr/lib/python3.12/site-packages/uno.py", line 19, in <module> > import pyuno > ModuleNotFoundError: No module named 'pyuno' > > Note: I am importing `uno`, however the error goes from the LibreOffice > internals about "pyuno" instead. > > I made a file search for a file named "pyuno"¹ in the sources and LO repo > has none. I presume this is a new bug on the LO side…? > > 1: > https://github.com/ > search?q=repo%3ALibreOffice%2Fcore+path%3A**%2Fpyuno*&type=code Not a bug on LibreOffice's side. You seem to have installed uno.py via pip. Better to use what is shipped with LibreOffice. This might help to check: export PYTHONPATH=/usr/lib/libreoffice/program/:$PYTHONPATH For me, nothing is printed with test.py with the original steps (uno is imported fine). Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: cfffcbc39b2c6794eaeddae5134fb59848a76d41 CPU threads: 8; OS: Linux 6.9; UI render: default; VCL: kf6 (cairo+wayland) Locale: fi-FI (fi_FI.UTF-8); UI: en-US Calc: CL threaded
(In reply to Buovjaga from comment #11) > (In reply to Konstantin Kharlamov from comment #10) > > So, I am trying to repro this again, and I'm getting the following error: > > > > Traceback (most recent call last): > > File "/tmp/test.py", line 1, in <module> > > import uno > > File "/usr/lib/python3.12/site-packages/uno.py", line 19, in <module> > > import pyuno > > ModuleNotFoundError: No module named 'pyuno' > > > > Note: I am importing `uno`, however the error goes from the LibreOffice > > internals about "pyuno" instead. > > > > I made a file search for a file named "pyuno"¹ in the sources and LO repo > > has none. I presume this is a new bug on the LO side…? > > > > 1: > > https://github.com/ > > search?q=repo%3ALibreOffice%2Fcore+path%3A**%2Fpyuno*&type=code > > Not a bug on LibreOffice's side. You seem to have installed uno.py via pip. > Better to use what is shipped with LibreOffice. Checked: `uno.py` is the one shipped with LibreOffice λ pacman -Qo /usr/lib/python3.12/site-packages/uno.py /usr/lib/python3.12/site-packages/uno.py is owned by libreoffice-fresh 24.2.4-1 λ pacman -Qo /usr/lib/libreoffice/program/* | grep -v libreoffice-fresh [… no output, i.e. everything's owned by libreoffice-fresh …] > This might help to check: > export PYTHONPATH=/usr/lib/libreoffice/program/:$PYTHONPATH This indeed has helped. However, I had never had to use PYTHONPATH env. variable AFAIR, so something's changed compared to how it worked before… I just checked whether I rebooted the system after the last update, and I did, so that's not it… > For me, nothing is printed with test.py with the original steps (uno is > imported fine). With the `PYTHONPATH` workaround I get this error printed: λ python3 test.py Traceback (most recent call last): File "/tmp/test.py", line 13, in <module> desktop = connectToLO() ^^^^^^^^^^^^^ File "/tmp/test.py", line 11, in connectToLO return smgr.createInstanceWithContext( "com.sun.star.frame.Desktop", ctx) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ com.sun.star.uno.RuntimeException: Binary URP bridge disposed during call at /usr/src/debug/libreoffice-fresh/libreoffice-24.2.4.2/binaryurp/source/bridge.cxx:615
(In reply to Konstantin Kharlamov from comment #12) > This indeed has helped. However, I had never had to use PYTHONPATH env. > variable > AFAIR, so something's changed compared to how it worked before… > > I just checked whether I rebooted the system after the last update, and I > did, so > that's not it… You might ask for help on some support channel/forum of your Linux distribution.