-
Notifications
You must be signed in to change notification settings - Fork 16
A Scripting Framework error occurred while executing the Python script #29
Comments
Same here.
|
Same here:
|
Same here: |
Please check the latest release v1.5. |
Same here (with v1.5) |
@JLuisGT could you please give some more information?
|
Hi @slgobinath It's very attentive of you to answer this fast! |
Hi, |
Hi, @slgobinath I don't really know. I just close all the LO products and make the Ubuntu derivatives installation, as recommended.
How can I check if I made a current or all users installation? Best regards. |
Hi, @ruben1981 fixed the problem by copying the import pygments
print(pygments.__file__) In my case the output is To copy this module, enter the following command:
|
Hi, @slgobinath I try your suggestion without luck. In my case pygments is in /usr/lib/python3/dist-packages/pygments. Just as a note: I also try refreshing the user profile, giving that another extension (TexMaths) wasn't working as well. After the refreshing, TexMaths is working but no luck with this handy extension. I'll keep trying and thanks a lot for your patience. |
When you install the extension did you get the option to install it for only you or for all users? If so, please install it only for you and see if it works. In my case, I am using LM 19.1 and LO 6.0.7.3 with no problem. I will give a try with the latest LO and let you know. |
I am commenting for myself because I am hitting this issue over again, if text is selected instead of container it will crash. So I guess if there is no container selected but some text, the script should resolve to current container before processing. |
[SOLVED] In the documentation, it was written to install the following packages: If you are still getting the error, try installing 'python3-pygments': |
Hi! Have a good day! |
SOLVED (WINDOWS 10) Go to --> "C:\Users\ {Your Username} \AppData\Local\Programs\Python\Python37\Lib\site-packages" That's it, Done. |
On Ubuntu 18.04, I managed to fix the issue by installing LibreOffice with apt-get instead of snap. Not sure what the issue was or if it was even related to that, but it might be worth a try. |
I had the same issue but it was solved once I installed python3-pygments, python3-pip, etc. using sudo apt install package |
hello @slgobinath |
Can't contribute much to this issue right now. I've had the same troubles however and just documenting what I've done so far. A short note about installing Pygments from Debian repositories, or the likes, is that it will probably be a much older version of Pygments than is available with pip, so maybe Anyway, the following creates the failures: installing codehighlighter with With DEBUG in
...
The following is debug output when adding the extension. This is from the unopkg gui program when extension is not installed through to it apparently being "installed":
Reading the thread it seems that various combinations of copying pygments around manually or installing extension globally or for only single user will make the problem go away. Anyone have any further ideas, or where to look for clues?
|
After more research I find that this is most likely to do with the maintainer not wanting to maintain two versions of the extension for all users and only installed for single user. There is an extensive discussion on this at: Document Foundation Bug #100307. It is essentially an added workload to make the It also seems to be an issue worsened by a bug in the libreoffice core that isn't quite pinned down as yet.... because ideally core or Unopkg should warn about this in a friendly way. To install this extension and use it - this is the process that worked for me:
Then it should work. Good luck. |
I agree you, i've searched tons of web pages but only this comment solved my problem. Thank you :) |
For me the solving hint. It was not because of downloading it multiple times, but download file had an additional prefix: ea4db15f_codehighlighter.oxt. After renaming it works on my system. |
Maybe this error popup should display a link to this ticket :) |
Kudos to @yneuma , renaming the extension fixed it for me on my Fedora 32 system. I'd tried manually copying the pygments folder etc, but it turns out the default filename of the package after you download it from the extensions website is the problem. So get rid of the ea4db15f_ in the package filename... |
I have no idea why this happens (the lookup should be based on internal extension name, not installation filename), but I can confirm that the renaming fixes it. I had a non-working install, and:
And it worked, all of a sudden. Nothing else in my system changed. |
Renaming the installation file solved the scripting framework error for me too. |
Renaming the installation file worked for me! |
Fixed after renaming it to |
Above it's not true, I have it in codehighlighter.oxt the same issue. The issue is with local python installation can't be found and there are no instruction how to install it properly. The package libreoffice-script-provider-python installs strange wrappers: |
Thank you!!! that works for me! |
After experimenting a bit, I discovered that, when installing, the file name had to be named exactly System: Ubuntu 18.04.4 LTS Libreoffice didn't appear to be using an internal version of python, but rather my generic installation. |
I confirm that in Ubuntu 20.04 it works by renaming the extension file to "codehighlighter.oxt" before installing. It works with pygments installed in either way "sudo apt install python3-pygments" or "sudo pip3 install pygments". |
|
snap put you applications in a container and therefore can't access your system library. |
This fix my issue as well.
|
I had same problem but was able to fix it by: |
Work for me Thanks Kubuntu: 20.04 |
I had a similar problem and I solved it copying |
Win10, LibreOffice 7.1.3.2 |
This fixed my issue. (Ubuntu 20.04) |
For me, the problem occured when I installed the extension from the file named "ea4db15f_codehighlighter.oxt". I changed the name to "codehighlighter.oxt" and reinstalled and now it's working properly. I guess somehow libraOffice cannot find the extension if the name of installation file is different to "codehighlighter.oxt". |
Solution for windows :
|
Alternative: |
That worked in my case. Thank you! (LO 6.4.7.2 on Linux Mint 20.3 Cinnamon) |
It seems I installed correctly the Code Highlighter. I followed all steps on installation. But when I select the text on Impress and choose to highlight a Python code, the following error happens:
A Scripting Framework error occurred while executing the Python script
vnd.sun.star.script:codehighlighter.oxt|python|highlight.py$highlight_python3_default?language=Python&location=user:uno_packages.
Mensagem: <class 'KeyError'>: 'codehighlighter.oxt'
File "/usr/lib/libreoffice/program/pythonscript.py", line 993, in getScript
self.provCtx.uriHelper.getStorageURI(scriptUri) );
File "/usr/lib/libreoffice/program/pythonscript.py", line 381, in getStorageUrlFromPersistentUrl
package = self.mapPackageName2Path[ packageName ]
The text was updated successfully, but these errors were encountered: