[Solved] VsCode/Pycharm - Can not resolve UNO imports
Posted: Sat Sep 02, 2023 1:57 pm
I am creating some bigger Python macros in Libre Office. They run nicely from LO and also from IDE (both VSCode, Pycharm). To run from IDE, I use IDE_utils. IDE is recognizing XSCRIPCINTEXT, uno and unohelper. But when I import some packages like e.g.
the package names are underlined with error "can not find import", "can not resolve import" etc. The code runs fine in IDE and LO, no problem. Just the IDE does not recognize the packages, it does not know, where are these placed. Of course, I have set the LO Python interpreter in IDE and also tried to add
to VSCode configuration. It did not help. I can live with that
but still I am sad that the package names are not recognized by IDE, which means it thinks we have an arror there and of course intellisense does not work for these packages 
Code: Select all
import pyuno
from com.sun.star.beans import UnknownPropertyException
Code: Select all
"python.autoComplete.extraPaths": [
"/usr/lib/python3/dist-packages/"
],

