Git Product home page Git Product logo

oauth2ooo's Introduction

OAuth2OOo logo Documentation

Ce document en français.

The use of this software subjects you to our Terms Of Use and Data Protection Policy.

version 1.3.6

Introduction:

OAuth2OOo is part of a Suite of LibreOffice and/or OpenOffice extensions allowing to offer you innovative services in these office suites.

This extension is the implementation of the OAuth 2.0 protocol. Protocol allowing you to obtain your consent so that an application can access your data present at the GAFA.

It allows executing HTTP requests in BASIC and provides the following macros as an example:

If you open a document beforehand, you can launch them by:
Tools -> Macros -> Run Macro... -> My Macros -> OAuth2OOo -> macro-name -> Main -> Run

It also allows grabbing internet data in a Calc sheet. See the following Calc files as an example:

And finally, it allows you to drive Firefox using a Calc file (or any other browser supported by Selenium). See the following files:

Being free software I encourage you:

  • To duplicate its source code.
  • To make changes, corrections, improvements.
  • To open issue if needed.

In short, to participate in the development of this extension. Because it is together that we can make Free Software smarter.


Requirement:

In order to take advantage of the latest versions of the Python libraries used in OAuth2OOo, version 2 of Python has been abandoned in favor of Python 3.8 minimum.
This means that OAuth2OOo no longer supports OpenOffice and LibreOffice 6.x on Windows since version 1.1.0. I can only advise you to migrate to LibreOffice 7.x.

The requirement depend on the platform (architecture) on which the extension is installed:

  • If you are on Windows (win32 or win_amd64) you must use LibreOffice version 7.x minimum.

  • If you are on Linux (x86_64) with a Python version from 3.8 to 3.12 you must use LibreOffice version 6.x or higher (LibreOffice version 7.x is strongly recommended).

  • For all other platforms / architectures (Linux, macOS... / aarch64, arm64...) or Python version, you need:

    • Make sure your version of Python is 3.8 minimum.
    • Download the file requirements.txt.
    • Install using pip, the Python packages necessary for the extension with the command:
      pip install requirements.txt
    • Install the extension under LibreOffice version 6.x or higher.

On Linux and macOS the packages used by the extension, if already installed, may come from the system and therefore may not be up to date.
To ensure that your Python packages are up to date it is recommended to use the System Info option in the extension Options accessible by:
Tools -> Options -> Internet -> OAuth2 protocol -> View log -> System Info
If outdated packages appear, you can update them with the command:
pip install --upgrade <package-name>

For more information see: What has been done for version 1.3.0.

If you want to drive Firefox in Calc on Ubuntu then you need to reinstall Firefox from the Mozilla PPA.
To install the Mozilla PPA please type the command:
sudo add-apt-repository ppa:mozillateam/ppa


Installation:

It seems important that the file was not renamed when it was downloaded.
If necessary, rename it before installing it.

Restart LibreOffice after installation.
Be careful, restarting LibreOffice may not be enough.

  • On Windows to ensure that LibreOffice restarts correctly, use Windows Task Manager to verify that no LibreOffice services are visible after LibreOffice shuts down (and kill it if so).
  • Under Linux or macOS you can also ensure that LibreOffice restarts correctly, by launching it from a terminal with the command soffice and using the key combination Ctrl + C if after stopping LibreOffice, the terminal is not active (no command prompt).

Use:

This extension is not made to be used alone, but provide OAuth2 service to other LibreOffice / OpenOffice extensions.
Here's how we use its API:

Create OAuth2 service:

identifier = "io.github.prrvchr.OAuth2OOo.OAuth2Service"
service = ctx.ServiceManager.createInstanceWithContext(identifier, ctx)

Initialize Session or at least Url:

  • Initialize Session:

initialized = service.initializeSession(registered_url, user_account)

The return value: initialized is True if user_account is already authorized for registered_url.

  • Initialize Url:

initialized = service.initializeUrl(registered_url)

The return value: initialized is True if registered_url was successfully found in the OAuth2 service configuration.

Get the access token:

format = 'Bearer %s'
token = service.getToken(format)


Uno OAuth2.0 API for LibreOffice.

OAuth2OOo Wizard Page1 screenshot

OAuth2OOo Wizard Page2 screenshot

OAuth2OOo Wizard Page3 screenshot

OAuth2OOo Browser Page1 screenshot

OAuth2OOo Browser Page2 screenshot

OAuth2OOo Browser Page3 screenshot

OAuth2OOo Browser Page4 screenshot

OAuth2OOo Wizard Page4 screenshot

The OAuth2 protocol allows access to server resources, after accepting the connection authorization, by exchanging tokens.

The revocation takes place in the management of the applications associated with your account.

No more password is stored in LibreOffice.


Has been tested with:

  • LibreOffice 7.3.7.2 - Lubuntu 22.04 - Python version 3.10.12

  • LibreOffice 7.5.4.2(x86) - Windows 10 - Python version 3.8.16 (under Lubuntu 22.04 / VirtualBox 6.1.38)

  • LibreOffice 7.4.3.2(x64) - Windows 10(x64) - Python version 3.8.15 (under Lubuntu 22.04 / VirtualBox 6.1.38)

  • Does not work with OpenOffice see bug 128569. Having no solution, I encourage you to install LibreOffice.

I encourage you in case of problem 😕
to create an issue
I will try to solve it 😄


Historical:

What has been done for version 0.0.5:

  • Writing of a new XWizard interface in order to replace the Wizard service which became defective with version 6.4.x and 7.x of LibreOffice (see bug 132110).

    This new interface also fixes bug 132661 and bug 132666 and allows access to versions 6.4.x and 7.x of LibreOffice...

    In addition this new XWizard adds new functionality such as:

    • Automatic resizing of the Wizard to the dimensions of the first displayed page.
    • Automatic move to page X on opening if possible.
  • Fixed an issue with tokens without expiration (as used by Dropbox) on testing their validity...

  • Many other fix...

What has been done for version 0.0.6:

  • Rewrite of the OAuth2 wizard trying to follow the MVA model as best as possible. This wizard is made up of 5 pages inheriting from the UNO XWizardPage interface:

  • Rewrite of the three UNO services provided by the OAuth2OOo extension in three separate files:

  • Rewrite of the options dialog accessible by Tools -> Options -> Internet -> Protocol OAuth2. This dialog is composed of two windows:

    • The logging window: Adapter and View.
    • The OAuth2OOo extension configuration options window: Adapter and View.
  • Rewrite a single data model: OAuth2Model managing wizard, services and options dialog.

  • Google loopback flow error has been fixed. See Issue #10

  • Use for Dropbox their new OAuth2 API with expirable tokens.

  • Many other fix...

What has been done for version 1.0.0:

  • Porting Python API Requests to LibreOffice / OpenOffice UNO API. Two UNO interfaces are accessible:

    The XRequestParameter interface supports sync token handling as well as HTTP request paging, as used in the HTTP Rest APIs

  • Uploading and downloading files is possible thanks to the methods or properties:

    • XOAuth2Service.download() allowing resumable file download.
    • XOAuth2Service.upload() allowing resumable file upload.
    • XOAuth2Service.getInputStream() to get an input stream.
    • XRequestParameter.DataSink to set an input stream.
    • XRequestResponse.getInputStream() to get an input stream.
  • Porting Java API javax.json to LibreOffice / OpenOffice UNO API as defined in idl files: com.sun.star.json.*

    • A factory of JSON structures is accessible via the getJsonBuilder() interface of XRequestParameter.
    • A Json parser is returned by the getJson() interface of XRequestResponse.

This makes HTTP requests using JSON easily usable in the BASIC language of LibreOffice.

What has been done for version 1.0.1:

  • Writing of 15 functions in Calc AddIns as described in the following files:

    • The file OAuth2Plugin.idl which declares new interfaces to UNO.
    • The file CalcAddIns.xcu which makes available these new interfaces in the list of Calc functions.
    • The file OAuth2Plugin.py which is the implementation of the UNO service com.sun.star.auth.Oauth2Plugin providing these new interfaces.
    • The file plugin.py which is the library implementing the interfaces of this new UNO service.
  • These 4 new files give access to 15 new Calc formulas which are:

    • GETHTTPBOBY(URL,METHOD,ENCODING,PARAMETERS)
    • PARSEHTML(DATA,PATH,BASEURL)
    • PARSEXML(DATA,PATH,BASEURL)
    • PARSEJSON(DATA,PATH)
    • JAVASCRIPT2XML(DATA,PATH)
    • XML2JSON(DATA,PATH)
    • JAVASCRIPT2JSON(DATA,PATH)
    • DUBLINCORE2JSON(DATA,BASEURL)
    • JSONLD2JSON(DATA,BASEURL)
    • MICRODATA2JSON(DATA,BASEURL)
    • MICROFORMAT2JSON(DATA,BASEURL)
    • OPENGRAPH2JSON(DATA,BASEURL)
    • RDFA2JSON(DATA,BASEURL)
    • FLATTENJSON(DATA,TYPENAME,PATH,SEPARATOR)
    • SPLITJSON(DATA,TYPENAME,PATH,SEPARATOR)

What has been done for version 1.1.0:

  • End of support for Python 2.x and therefore for OpenOffice.

  • Integration of Selenium version 4.10 in the extension in order to make LibreOffice able to control a browser via Calc formulas inserted in a spreadsheet.

  • Use of webdriver_manager version 3.8.6 to automate the installation of the browser's WebDriver.

  • Creation of 5 Calc formulas allowing the piloting of the browser:

    • BROWSEROPEN(BROWSER,PATH,INIT,OPTIONS)
    • BROWSERCLICK(SESSION,BY,PATH,URL,INIT,WAIT)
    • BROWSERFIELD(SESSION,BY,PATH,VALUE,URL,INIT,WAIT)
    • BROWSERFORM(SESSION,FORM,URL,INIT,WAIT)
    • BROWSERCONTENT(SESSION,URL,ENCODING)
  • Creation of a Calc formula allowing HTTP Basic Auth authentication for HTTP requests:

    • HTTPAUTH(NAME,PASSWORD)
  • Calc formula GETHTTPBOBY has been renamed to HTTPCONTENT.

What has been done for version 1.1.1:

What has been done for version 1.1.2:

What has been done for version 1.2.0:

  • There are now two methods of creating the OAuth2Service service which are:

    • create() without parameter, returns an instance of the service.
    • createWithOAuth2([in] string sUrl, [in] string sUser) with an Url and the user's address, returns an instance of the service with the OAuth2 protocol.
      In its second form, the OAuth2 authorization Wizard will launch automatically if the scope of the Url rights has not yet been granted by the user (ie: first connection).
      If this is the case and the Wizard is aborted then a null value will be returned instead of the requested service.
  • Two BASIC macros: GoogleAPIRequest and GraphAPIRequest allow you to make HTTP requests on the Google Contact and Microsoft Graph APIs.
    The OAuth2 protocol essential for the use of these APIs is integrated automatically and transparently into HTTP requests. You won't have to worry about it.

What has been done for version 1.2.1:

  • Added a new method isAuthorized() to the XOAuth2Service interface supported by the OAuth2Service service. This method allows you to launch the OAuth2 configuration Wizard if the user is not authorized.

What has been done for version 1.2.2:

  • Fixed an error when refreshing OAuth2 tokens.

What has been done for version 1.2.3:

  • Fixed an error on isAuthorized() on OAuth2Service.

What has been done for version 1.2.4:

  • Updated embedded python packages.

What has been done for version 1.3.0:

  • Using the new version 3.6.2 of pyRdfa3.
  • All Python packages necessary for the extension are now recorded in a requirements.txt file following PEP 508.
  • Now if you are not on Windows then the Python packages necessary for the extension can be easily installed with the command:
    pip install requirements.txt
  • Simplification of the Requirement section.
  • Many fixes...

What has been done for version 1.3.1:

  • Fixed the Headers property in the implementation of the UNO interface XRequestResponse allowing to obtain the headers of an HTTP response.
  • Many fixes...

What has been done for version 1.3.2:

  • Integration of Python 3.8 binaries for Linux x86_64 and Darwin x86_64, in order to be compatible with the version of LibreOffice 24.2.x for Linux, for the lxml, ijson, cffi and charset-normalizer packages.
  • Opening of issue #159988 for the impossibility of importing Python libraries containing binary files with LibreOffice 24.2.x under Linux.

What has been done for version 1.3.3:

  • Implemented a workaround for issue #159988 which may take time to resolve.

What has been done for version 1.3.4:

What has been done for version 1.3.5:

What has been done for version 1.3.6:

Updating all these Python packages should make it possible to use Python 3.8, 3.9, 3.10, 3.11 and 3.12 under ManyLinux x86_64 architecture.
For win32 and win_amd64 architectures, only Python version 3.8 is supported. This means that since Python is embedded into LibreOffice for these architectures, only LibreOffice versions 7.x and 24.x are supported.
If your architecture is not yet supported by OAuth2OOo (Mac OSX, arm...), I advise you to open an issue so that I can add the missing binaries.

What remains to be done for version 1.3.6:

  • Add new language for internationalization...

  • Anything welcome...

oauth2ooo's People

Contributors

prrvchr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

oauth2ooo's Issues

Sign in with Google temporarily disabled for this app

Hi,

I followed your instructions and got the following message after the last step.

Sign in with Google temporarily disabled for this app

This app has not been verified yet by Google in order to use Google Sign In.

Any ideas what to do?

Trying to use but confused

If there is a better place for this, please say so. I'm a professional programmer but just starting in on LibreOffice. I'm trying to figure out how to use OAuth2OOo but can't find much in the way of examples.

	dim oauth2 as object
	oauth2 = CreateUnoService("io.github.prrvchr.OAuth2OOo.OAuth2Service")

gives

BASIC runtime error.
An exception occurred 
Type: com.sun.star.uno.RuntimeException
Message: <class 'RuntimeError'>: Requests dependency 'urllib3' must be version >= 1.21.1, < 1.22!, traceback follows
  File "C:\Users\bugma\scoop\apps\libreoffice\current\LibreOffice\program\pythonloader.py", line 134, in activate
    mod = self.getModuleFromUrl( locationUrl )
  File "C:\Users\bugma\scoop\apps\libreoffice\current\LibreOffice\program\pythonloader.py", line 102, in getModuleFromUrl
    exec(codeobject, mod.__dict__)
  File "C:\Users\bugma\AppData\Roaming\LibreOffice\4\user\uno_packages\cache\uno_packages\lu115447545e4.tmp_\OAuth2OOo.oxt\service\OAuth2Service.py", line 57, in <module>
    from oauth2 import KeyMap
  File "C:\Users\bugma\scoop\apps\libreoffice\current\LibreOffice\program\uno.py", line 346, in _uno_import
    return _builtin_import(name, *optargs, **kwargs)
  File "C:\Users\bugma\AppData\Roaming\LibreOffice\4\user\uno_packages\cache\uno_packages\lu115447545e4.tmp_\OAuth2OOo.oxt\service\pythonpath\oauth2\__init__.py", line 30, in <module>
    from .options import OptionsManager
  File "C:\Users\bugma\scoop\apps\libreoffice\current\LibreOffice\program\uno.py", line 346, in _uno_import
    return _builtin_import(name, *optargs, **kwargs)
  File "C:\Users\bugma\AppData\Roaming\LibreOffice\4\user\uno_packages\cache\uno_packages\lu115447545e4.tmp_\OAuth2OOo.oxt\service\pythonpath\oauth2\options\__init__.py", line 30, in <module>
    from .optionsmanager import OptionsManager
  File "C:\Users\bugma\scoop\apps\libreoffice\current\LibreOffice\program\uno.py", line 346, in _uno_import
    return _builtin_import(name, *optargs, **kwargs)
  File "C:\Users\bugma\AppData\Roaming\LibreOffice\4\user\uno_packages\cache\uno_packages\lu115447545e4.tmp_\OAuth2OOo.oxt\service\pythonpath\oauth2\options\optionsmanager.py", line 39, in <module>
    from ..oauth2model import OAuth2Model
  File "C:\Users\bugma\scoop\apps\libreoffice\current\LibreOffice\program\uno.py", line 346, in _uno_import
    return _builtin_import(name, *optargs, **kwargs)
  File "C:\Users\bugma\AppData\Roaming\LibreOffice\4\user\uno_packages\cache\uno_packages\lu115447545e4.tmp_\OAuth2OOo.oxt\service\pythonpath\oauth2\oauth2model.py", line 53, in <module>
    from .wizard import WatchDog
  File "C:\Users\bugma\scoop\apps\libreoffice\current\LibreOffice\program\uno.py", line 346, in _uno_import
    return _builtin_import(name, *optargs, **kwargs)
  File "C:\Users\bugma\AppData\Roaming\LibreOffice\4\user\uno_packages\cache\uno_packages\lu115447545e4.tmp_\OAuth2OOo.oxt\service\pythonpath\oauth2\wizard\__init__.py", line 32, in <module>
    from .httpserver import Server
  File "C:\Users\bugma\scoop\apps\libreoffice\current\LibreOffice\program\uno.py", line 346, in _uno_import
    return _builtin_import(name, *optargs, **kwargs)
  File "C:\Users\bugma\AppData\Roaming\LibreOffice\4\user\uno_packages\cache\uno_packages\lu115447545e4.tmp_\OAuth2OOo.oxt\service\pythonpath\oauth2\wizard\httpserver.py", line 40, in <module>
    from requests.compat import unquote_plus
  File "C:\Users\bugma\scoop\apps\libreoffice\current\LibreOffice\program\uno.py", line 346, in _uno_import
    return _builtin_import(name, *optargs, **kwargs)
  File "C:\Users\bugma\AppData\Roaming\LibreOffice\4\user\uno_packages\cache\uno_packages\lu115447545ec.tmp_\gMailOOo.oxt\pythonpath\requests\__init__.py", line 57, in <module>
    raise RuntimeError('Requests dependency \'urllib3\' must be version >= 1.21.1, < 1.22!')

.

If occurs to me that urllib is an issue, viz

Package    Version
---------- -------
pip        23.2.1
setuptools 68.1.2
urllib3    2.0.4
wheel      0.41.2

How make POST HTTP request with OAuth2OOo ?

  1. How make this POST HTTP request with OAuth2OOo (LibreOffice BASIC):
    POST / HTTP/1.1
    Host : http://foo.com/
    Content-Type : application/x-www-form-urlencoded
    Content-Length : 13

say=Hi&to=Mom

  1. Please give an example of filling a Object Parameters - how fill Data(integer(0 to -1)) ?

  2. Where we can see the description of methods and properties of Object OAuth2OOo ?

Impossible d'installer l'extension sous LibreOffice 7.4.6.2 Windows 11

Hello,
lorsque j'essaie d'installer l'extension sous LibreOffice 7.4.6.2 windows 11 j'ai ce message d'erreur
(com.sun.star.uno.RuntimeException) { { Message = "<class 'ImportError'>: No module named 'ply' (or 'ply.lex.LexToken' is unknown), traceback follows\X000a File "C:\Program Files\LibreOffice\program\pythonloader.py", line 147, in writeRegistryInfo\X000a mod = self.getModuleFromUrl( locationUrl )\X000a File "C:\Program Files\LibreOffice\program\pythonloader.py", line 102, in getModuleFromUrl\X000a exec(codeobject, mod.dict)\X000a File "C:\Users\lcm\AppData\Roaming\LibreOffice\4\user\uno_packages\cache\uno_packages\lu18712fwp3i.tmp\OAuth2OOo.oxt\service\OAuth2Service.py", line 57, in \X000a from oauth2 import getAccessToken\X000a File "C:\Program Files\LibreOffice\program\uno.py", line 346, in _uno_import\X000a return builtin_import(name, *optargs, **kwargs)\X000a File "C:\Users\lcm\AppData\Roaming\LibreOffice\4\user\uno_packages\cache\uno_packages\lu18712fwp3i.tmp\OAuth2OOo.oxt\service\pythonpath\oauth2\init.py", line 65, in \X000a from .plugin import extract2Json\X000a File "C:\Program Files\LibreOffice\program\uno.py", line 346, in _uno_import\X000a return builtin_import(name, *optargs, **kwargs)\X000a File "C:\Users\lcm\AppData\Roaming\LibreOffice\4\user\uno_packages\cache\uno_packages\lu18712fwp3i.tmp\OAuth2OOo.oxt\service\pythonpath\oauth2\plugin.py", line 31, in \X000a import js2xml\X000a File "C:\Program Files\LibreOffice\program\uno.py", line 346, in _uno_import\X000a return builtin_import(name, *optargs, **kwargs)\X000a File "C:\Users\lcm\AppData\Roaming\LibreOffice\4\user\uno_packages\cache\uno_packages\lu18712fwp3i.tmp\OAuth2OOo.oxt\service\pythonpath\js2xml\init.py", line 1, in \X000a from calmjs.parse.parsers.es5 import Parser\X000a File "C:\Program Files\LibreOffice\program\uno.py", line 346, in _uno_import\X000a return builtin_import(name, *optargs, **kwargs)\X000a File "C:\Users\lcm\AppData\Roaming\LibreOffice\4\user\uno_packages\cache\uno_packages\lu18712fwp3i.tmp\OAuth2OOo.oxt\service\pythonpath\calmjs\parse\init.py", line 6, in \X000a from calmjs.parse.factory import ParserUnparserFactory\X000a File "C:\Program Files\LibreOffice\program\uno.py", line 346, in _uno_import\X000a return builtin_import(name, *optargs, **kwargs)\X000a File "C:\Users\lcm\AppData\Roaming\LibreOffice\4\user\uno_packages\cache\uno_packages\lu18712fwp3i.tmp\OAuth2OOo.oxt\service\pythonpath\calmjs\parse\factory.py", line 9, in \X000a from calmjs.parse import asttypes\X000a File "C:\Program Files\LibreOffice\program\uno.py", line 346, in _uno_import\X000a return builtin_import(name, *optargs, **kwargs)\X000a File "C:\Users\lcm\AppData\Roaming\LibreOffice\4\user\uno_packages\cache\uno_packages\lu18712fwp3i.tmp\OAuth2OOo.oxt\service\pythonpath\calmjs\parse\asttypes.py", line 30, in \X000a from ply.lex import LexToken\X000a File "C:\Program Files\LibreOffice\program\uno.py", line 425, in _uno_import\X000a raise uno_import_exc\X000a File "C:\Program Files\LibreOffice\program\uno.py", line 346, in _uno_import\X000a return builtin_import(name, *optargs, **kwargs)\X000a\X000a", Context = (com.sun.star.uno.XInterface) @0 } }

Ami calmant, J.P

Google broke it!

Everything is working fine untill we have to auth, it redirect propperly to the default browser and then this happens (att.)
2020-01-25-132142_720x287_scrot

Problems in 7.3

I am trying to perform a email mail merge in libreoffice 7.3.
I have performed the Oauth2 wizard in the extension manager, and that was successful.
I am using gmail.
In the mail merge menu, I am able to set up the merge, it prepares to send the emails, but never actually sends them. I'm not sure how to debug this.

6 digit authorization code

Hi prrvchr,

While testing and trying to save to google drive a dialog requests 6 digit pin number. Two step authentication is disabled in Google.

Regards

not authrization

hi,

I tried to install google drive connection like below but i can not do authorization request, while i enter my google email, it freeze and not authorize. I use mac pro.


In menu Tools - Options - LibreOffice - Advanced - Open Expert Configuration

Search for: UseSystemFileDialog (Found under: org.openoffice.Office.Common > Misc)

Edit or change “true” to “false” (set it to “false”)
Open your Google Drive:

In File - Open - File name enter: vnd.google-apps://your_account/ or vnd.google-apps:///

If you don’t give your_account, you will be asked for…

After authorizing the OAuthOOo application to access your Drive, your Google Drive should open!!! normally ;-)

screenshot

only able to "add" URL after choosing a provider and a scope

This is a minor inconvenience, but I thought I'd report it:

If pasting a URL into the "URL" field in the OAuth2 settings, the "Add" button is greyed out.
One has to first fill in the "Provider" and "Scopes" fields, before being able to click "Add". And once you click "Add", it empties the "Provider" and "Scopes" fields, so you have to fill them in once again before being able to click "Next".

This is on:

  • Windows 10
  • LibreOffice 7.2.1.1

How to make Mail Merge use the token?

Hi there!

I am not sure if it is my lack of understanding or a lack of documentation, but: once the OAuth2 has been successfully established, how does one make Mail Merge in LibreOffice use that authentication to send emails with that email account?

I am using the following at the moment:

Version: 7.2.1.1 (x64) / LibreOffice Community
Build ID: 3cfc32d9754d2d239bd8ce2941029c12873010c1
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: default; VCL: win
Locale: en-AU (en_AU); UI: en-US
Calc: threaded

with OAuth2OOo version 0.0.5

'RuntimeExecption: No module named 'lxml.etree'

Hi,

I have an issue with installing the OAuth2OOo for LibreOffice(24.2.0.3 (X86_64, Flatpak)).
The issue is the following error when trying to install the extension:
2024-02-25_20-12

I have run the: pip install -r requirements.txt
Python version: 3.10.12

Platform info:
Distributor ID: Pop
Description: Pop!_OS 22.04 LTS
Release: 22.04
Codename: jammy

I have tried to install the lxml packaged for Python, but it yielded nothing - the same error.

Let me know if any further details are required.

Error message after installation on macOS.

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

Can't authorise in google

Hello!
When i try to get access from libreoffice 6.3 to gdrive i get following errors:

  1. When sending request to google for OAuth2OOo app allowance, the browser returns error [Missing required parameter 'scope']. If i add the scope string manually in the module's settings it replaces nonalphabetic symbols to hex codes.
  2. The module does not add the 'scope' part authomatically despite correct appropriate setting.
  3. Finally i've replaced needed symbols manually in the URL and managed to register OAuth module in my google account, but no success opening the gdrive, the gdriveOOo plugin reports with 'nonexistent object' and 'nonexistant file' messageboxes

LibreOffice extension does not work

Hi. I tryied to install the extension on the Libreoffice V. 6.0.7.3, but it doesn't work. Durign installation I receive an error message, even if the extension seems to be installed. Then I try to activate the extension and i get a lot of error. Every error attached. Could you please help me? Thanks kind rgds
err_oauth2_1
err_oauth2_2
err_oauth2_3
err_oauth2_4
err_oauth2_5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.