Amourspirit / python_libre_pythonista_ext

Apache License 2.0
98 stars 5 forks source link

It doesen't work #24

Closed Riccardocasoli closed 3 weeks ago

Riccardocasoli commented 4 weeks ago

after having installed Pythonista on OO2.4.6 for win64 following your video guide (and restarted OO al the needed times) I tried to open your example .ods files but Calc shows errors (ERR:504) where should be the Python formulas. What did I miss? immagine

And if I clck on the <> button (as all the buttons in the spreadsheet) I get the following error message: Errore dello Scripting Framework durante l'esecuzione dello script Python vnd.sun.star.script:LibrePythonista.oxt|python|scripts|control_handler.py$on_btn_action_preformed?language=Python&location=user:uno_packages.

Messaggio: <class 'ImportError'>: No module named 'attr' (or 'attr.has' is unknown) File "C:\Program Files\LibreOffice\program\pythonscript.py", line 1058, in getScript mod = self.provCtx.getModuleByUrl( fileUri ) File "C:\Program Files\LibreOffice\program\pythonscript.py", line 495, in getModuleByUrl exec(code, entry.module.dict) File "C:\Users\ricca\AppData\Roaming\LibreOffice\4\user\uno_packages\cache\unopackages\lu15848ax3h.tmp\LibrePythonista.oxt\python\scripts\control_handler.py", line 6, in from ooodev.calc import CalcDoc File "C:\Program Files\LibreOffice\program\uno.py", line 346, in _uno_import return _builtin_import(name, *optargs, kwargs) File "C:\Users\ricca\AppData\Roaming\Python\Python38\site-packages\ooodev\calc__init__.py", line 6, in from ooodev.utils.data_type.cell_obj import CellObj as CellObj File "C:\Program Files\LibreOffice\program\uno.py", line 346, in _uno_import return _builtin_import(name, *optargs, *kwargs) File "C:\Users\ricca\AppData\Roaming\Python\Python38\site-packages\ooodev\utils\data_type\cell_obj.py", line 9, in from ooodev.loader import lo as mLo File "C:\Program Files\LibreOffice\program\uno.py", line 346, in _uno_import return _builtin_import(name, optargs, kwargs) File "C:\Users\ricca\AppData\Roaming\Python\Python38\site-packages\ooodev\loader__init__.py", line 1, in from .lo import Lo as Lo File "C:\Program Files\LibreOffice\program\uno.py", line 346, in _uno_import return _builtin_import(name, *optargs, kwargs) File "C:\Users\ricca\AppData\Roaming\Python\Python38\site-packages\ooodev\loader\lo.py", line 36, in from ooodev.loader.inst import lo_inst File "C:\Program Files\LibreOffice\program\uno.py", line 346, in _uno_import return _builtin_import(name, *optargs, *kwargs) File "C:\Users\ricca\AppData\Roaming\Python\Python38\site-packages\ooodev\loader\inst__init__.py", line 4, in from .lo_inst import LoInst as LoInst File "C:\Program Files\LibreOffice\program\uno.py", line 346, in _uno_import return _builtin_import(name, optargs, kwargs) File "C:\Users\ricca\AppData\Roaming\Python\Python38\site-packages\ooodev\loader\inst\lo_inst.py", line 67, in from ooodev.loader.comp.the_desktop import TheDesktop File "C:\Program Files\LibreOffice\program\uno.py", line 346, in _uno_import return _builtin_import(name, *optargs, kwargs) File "C:\Users\ricca\AppData\Roaming\Python\Python38\site-packages\ooodev\loader\comp\the_desktop.py", line 3, in from ooodev.adapter.frame.the_desktop_comp import TheDesktopComp File "C:\Program Files\LibreOffice\program\uno.py", line 346, in _uno_import return _builtin_import(name, *optargs, *kwargs) File "C:\Users\ricca\AppData\Roaming\Python\Python38\site-packages\ooodev\adapter\frame\the_desktop_comp.py", line 3, in from ooodev.adapter.component_base import ComponentBase File "C:\Program Files\LibreOffice\program\uno.py", line 346, in _uno_import return _builtin_import(name, optargs, kwargs) File "C:\Users\ricca\AppData\Roaming\Python\Python38\site-packages\ooodev\adapter\component_base.py", line 67, in from ooodev.utils import info as mInfo File "C:\Program Files\LibreOffice\program\uno.py", line 346, in _uno_import return _builtin_import(name, *optargs, kwargs) File "C:\Users\ricca\AppData\Roaming\Python\Python38\site-packages\ooodev\utils\info.py", line 45, in from ooodev.utils import props as mProps File "C:\Program Files\LibreOffice\program\uno.py", line 346, in _uno_import return _builtin_import(name, *optargs, *kwargs) File "C:\Users\ricca\AppData\Roaming\Python\Python38\site-packages\ooodev\utils\props.py", line 10, in from attr import has File "C:\Program Files\LibreOffice\program\uno.py", line 425, in _uno_import raise uno_import_exc File "C:\Program Files\LibreOffice\program\uno.py", line 346, in _uno_import return _builtin_import(name, optargs, kwargs) .......

Amourspirit commented 3 weeks ago

Thanks for reporting this. The error data is very useful.

It seems it is an issue with OOO Devevelopment Tools (OooDev). The attr module was accidently imported and is causing this issue.

LibrePythonista uses OooDev. I am updating OooDev and will also update LibrePythonista.

I expected this to be resolved later today. I will let you know here.

Amourspirit commented 3 weeks ago

OK, Version 0.4.2 is now published.

You should just need open the extension manager and check for updates. After LibrePythonista installs new dependencies then restart Calc on more time.