Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message after installation on macOS. #15

Closed
M-Rick opened this issue May 1, 2024 · 9 comments
Closed

Error message after installation on macOS. #15

M-Rick opened this issue May 1, 2024 · 9 comments

Comments

@M-Rick
Copy link

M-Rick commented May 1, 2024

I cannot manage to install this extension.
I constantly get this error message:

(com.sun.star.uno.RuntimeException) { { Message = "<class 'ImportError'>: cannot import name 'getAccessToken' from 'oauth2' (/Applications/LibreOffice.app/Contents/Frameworks/LibreOfficePython.framework/Versions/Current/lib/python3.8/site-packages/oauth2/__init__.py), traceback follows\X000a File \"/Applications/LibreOffice.app/Contents/Resources/pythonloader.py\", line 147, in writeRegistryInfo\X000a mod = self.getModuleFromUrl( locationUrl )\X000a File \"/Applications/LibreOffice.app/Contents/Resources/pythonloader.py\", line 102, in getModuleFromUrl\X000a exec(codeobject, mod.__dict__)\X000a File \"/Users/aymeric/Library/Application Support/LibreOffice/4/user/uno_packages/cache/uno_packages/lu19028nx2d48.tmp_/OAuth2OOo.oxt/service/OAuth2Service.py\", line 57, in <module>\X000a from oauth2 import getAccessToken\X000a\X000a at /Users/cloph/build/workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/uno/RuntimeException.hdl:24", Context = (com.sun.star.uno.XInterface) @0 } }

Version: 24.2.2.2 (AARCH64) / LibreOffice Community
Build ID: d56cc158d8a96260b836f100ef4b4ef25d6f1a01
CPU threads: 8; OS: macOS 14.4; UI render: Skia/Raster; VCL: osx
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Calc: threaded

@prrvchr
Copy link
Owner

prrvchr commented May 2, 2024

Hi M-Rick,

I doubt that you have installed the latest version since the error message you give me does not point to the correct content.

Could you confirm ?

Edit:

Looking closer it seems that the python oauth2 package is installed. I think that's where the problem comes from. You need to uninstall it...

@M-Rick
Copy link
Author

M-Rick commented May 2, 2024

Yes they are.

Capture d’écran 2024-05-02 à 18 59 12 Capture d’écran 2024-05-02 à 18 58 17

@prrvchr
Copy link
Owner

prrvchr commented May 2, 2024

OAuth2OOo version 1.1.0 is no longer supported, you must migrate to 1.3.4

@M-Rick
Copy link
Author

M-Rick commented May 2, 2024

Ok so the link on LibreOffice Extensions is outdated.
When you click on 'Download latest', you won't get the very last one, but version 1.1.0 whilst it's mentioned having being updated 2 months ago.

https://extensions.libreoffice.org/en/extensions/show/oauth2ooo

Capture d’écran 2024-05-02 à 19 45 24

@M-Rick
Copy link
Author

M-Rick commented May 2, 2024

This time, I downloaded the right one, but still unworking.

(com.sun.star.uno.RuntimeException) { { Message = "<class 'ImportError'>: cannot import name 'RequestParameter' from 'oauth2' (/Applications/LibreOffice.app/Contents/Frameworks/LibreOfficePython.framework/Versions/Current/lib/python3.8/site-packages/oauth2/__init__.py), traceback follows\X000a File \"/Applications/LibreOffice.app/Contents/Resources/pythonloader.py\", line 147, in writeRegistryInfo\X000a mod = self.getModuleFromUrl( locationUrl )\X000a File \"/Applications/LibreOffice.app/Contents/Resources/pythonloader.py\", line 102, in getModuleFromUrl\X000a exec(codeobject, mod.__dict__)\X000a File \"/Users/aymeric/Library/Application Support/LibreOffice/4/user/uno_packages/cache/uno_packages/lu23015obpk6c.tmp_/OAuth2OOo.oxt/service/OAuth2Service.py\", line 45, in <module>\X000a from oauth2 import RequestParameter\X000a\X000a at /Users/cloph/build/workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/uno/RuntimeException.hdl:24", Context = (com.sun.star.uno.XInterface) @0 } }

Capture d’écran 2024-05-02 à 19 56 57

@prrvchr
Copy link
Owner

prrvchr commented May 2, 2024

Ok so the link on LibreOffice Extensions is outdated.

That's right, I don't bother updating it anymore. I'll try to see if I can put a link to github rather than having to update with each new release

This time, I downloaded the right one, but still unworking.

It seems that a python package named oauth2 conflicts with the OAuth2OOo extension.

What's in the directory: /Applications/LibreOffice.app/Contents/Frameworks/LibreOfficePython.framework/Versions/Current/lib/python3.8/site-packages/oauth2

Can you try removing this folder oauth2 (by making a copy) I think it should work...

@prrvchr
Copy link
Owner

prrvchr commented May 2, 2024

I'll be quite happy to know if it works under ARM64 because I've never been able to test it.

@prrvchr
Copy link
Owner

prrvchr commented May 6, 2024

On the other hand, it seems that the Python oauth2 package was installed by LibreOffice (given the path in which it is located: /Applications/LibreOffice.app/Contents/Frameworks/LibreOfficePython.framework/Versions/Current/lib/python3.8/site-packages).
Would it be possible for you to confirm this?

@prrvchr
Copy link
Owner

prrvchr commented Jun 17, 2024

Ok I have just published OAuth2OOo version 1.3.5 which is installed in the oauth20 folder instead of oauth2.

This prevents any conflict with the python oauth2 module, as it seems was happening with your configuration.

I close but you are free to reopen if the problem persists.

@prrvchr prrvchr closed this as completed Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants