I have a Python 3 script for Calc that prints information to the console, and the printed output is visible in the console if LO was launched from the command line. If LO is launched from the GUI, the script still executes correctly but the information printed to the console is (obviously) not visible. The scripts have functioned well ever since LO supported Python 2.
After updating to Ubuntu 17.04, which apparently defaults to libreoffice-gtk3, I now get an error message about an Input/Output error when the Python script attempts to print. If I remove all the print statements from the Python script, the script executes successfully and without any messages.
If I uninstall libreoffice-gtk3 and install libreoffice-gtk (which uses gtk2), then LO executes the script correctly, with or without the print statements in the script.
If there is a fix to this (using gtk3), I’d love to hear it. Otherwise, I just wanted to share this information in case it portends a deeper issue.