1 year ago
#134315
Tony Radice
Running into pyoo problem with Python 3.8 and LibreOffice
I am running PyCharm 2021 EDU (updated) with a Python 3.8.2 installation on a Windows 10 OS. I am running LibreOffice 7.2.5.2 - so all applications should be at speed. I recently installed pyoo using pip. I am attempting a very simple startup script:
# PyCharm / LibreOffice Interface
import pyoo
desktop = pyoo.Desktop('localhost', 2002)
ss1 = desktop.create_spreadsheet()
which fails with
Traceback (most recent call last):
File "H:/Projects/Prj_01/Python/main.py", line 3, in <module>
import pyoo
File "C:\Users\tradice\AppData\Roaming\Python\Python38\site-packages\pyoo.py", line 18, in <module>
import uno
File "C:\Users\tradice\AppData\Roaming\Python\Python38\site-packages\uno\__init__.py", line 4, in <module>
from base import Element, Css, Payload, UnoBaseFeature, UnoBaseField
ModuleNotFoundError: No module named 'base'
When I attempt to use pip in install "base" I get
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [10 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\tradice\AppData\Local\Temp\pip-install-dcbp2ti8\base_6056a9f37a8249538be22ae6a3700b1c\setup.py", line 40, in <module>
LONG_DESCRIPTION = read("README.rst")
File "C:\Users\tradice\AppData\Local\Temp\pip-install-dcbp2ti8\base_6056a9f37a8249538be22ae6a3700b1c\setup.py", line 21, in read
return codecs.open(os.path.join(os.path.dirname(__file__), fname)).read()
File "C:\Program Files\Python38\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 5: character maps to <undefined>
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
I Apologize that I am a newbie at this - I cannot seem to locate a similar issue in searching... (Or too many responses to be of use...)
(I get the same error regardless of setting soffice running with the pipe activated...)
Would anyone care to venture a hint?
python
libreoffice
uno
0 Answers
Your Answer