[Libreoffice-bugs] [Bug 122545] New: Error on creating script provider for Python script from location=document
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Mon Jan 7 19:01:03 UTC 2019
https://bugs.documentfoundation.org/show_bug.cgi?id=122545
Bug ID: 122545
Summary: Error on creating script provider for Python script
from location=document
Product: LibreOffice
Version: 6.1.4.2 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Calc
Assignee: libreoffice-bugs at lists.freedesktop.org
Reporter: spinnau at gmail.com
Description:
When opening a Calc document with a user-defined function that calls some
Python code from location=document, the following error message will be shown:
BASIC runtime error.
An exception occurred
Type: com.sun.star.script.provider.ScriptFrameworkErrorException
Message: ProviderCache::createProvider() Error creating provider from
factory. <class 'KeyError'>: 'document’, traceback follows
File "/usr/lib/libreoffice/program/unohelper.py”, line 295, in
createInstanceWithArgumentsAndContext
return self.clazz(context, *args)
File "/usr/lib/libreoffice/program/pythonscript.py”, line 999, in __init__
raise e
File "/usr/lib/libreoffice/program/pythonscript.py”, line 975, in __init__
urlHelper = MyUriHelper(ctx, storageType)
File "/usr/lib/libreoffice/program/pythonscript.py”, line 189, in __init__
self.m_baseUri = expandUri(self.s_UriMap[location])
I have attached a sample document "HelloWorld.ods" with a minimal Python hello
world function, that is wrapped with a BASIC macro as a user-defined function.
This Calc document works fine with LibreOffice version up to 6.1.3.2. Newer
versions show the error message as described above when the file is opened.
Tested versions that are affected from this bug:
* 6.1.4.2 (Arch Linux 64 bit)
* 6.1.4.2 (Windows 32 bit)
* 6.2.0.1 (Linux 64 bit AppImage)
* 6.3.0.0.alpha0_2018-12-29 (Linux 64 bit AppImage)
Steps to Reproduce:
1. Allow execution of macros (changing "Macro Security" setting to "Medium")
2. Open the attached document "HelloWorld.ods"
3. Select "Enable Macros"
Actual Results:
The error message described above will be shown. The =HELLOWORLD() function in
cell "B3" is not evaluated.
Expected Results:
The formula in cell "B3" should evaluate to "Hello world".
Reproducible: Always
User Profile Reset: Yes
Additional Info:
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190107/a6ced812/attachment.html>
More information about the Libreoffice-bugs
mailing list