EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #09726


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

Re: [EP-tech] Coversheets Plugin/DocumentConverter.py script


Hi Lee,

I would recommend installing the RHEL package unoconv and then updating your executables.pl and invocations.pl files to use this instead of the Python script DocumentConverter.py.  That will likely be Python 2 and RHEL 8 will only have Python 3 installed.

It is also with taking a look at:

https://wiki.eprints.org/w/Coversheets

Regards

David Newman

On 10/06/2024 13:28, Lee Paton wrote:
CAUTION: This e-mail originated outside the University of Southampton.
CAUTION: This e-mail originated outside the University of Southampton.

Hi

 

I’m migrating our eprints repository from a CentOS 7 VM to a RHEL 8 VM and have hit some issues with the coversheets plugin. The DocumentConvert.py script is failing to run due to

 

Traceback (most recent call last):

  File "/usr/share/eprints/archives/orca/bin/DocumentConverter.py", line 227, in <module>

    converter.convert(argv[1], argv[2])

  File "/usr/share/eprints/archives/orca/bin/DocumentConverter.py", line 152, in convert

    family = self._detectFamily(document)

  File "/usr/share/eprints/archives/orca/bin/DocumentConverter.py", line 184, in _detectFamily

    if document.supportsService("com.sun.star.text.WebDocument"):

AttributeError: 'NoneType' object has no attribute 'supportsService'

 

It’s failing to see any of the following attributes on the document object:

 

    def _detectFamily(self, document):

        if document.supportsService("com.sun.star.text.WebDocument"):

            return FAMILY_WEB

        if document.supportsService("com.sun.star.text.GenericTextDocument"):

            # must be TextDocument or GlobalDocument

            return FAMILY_TEXT

        if document.supportsService("com.sun.star.sheet.SpreadsheetDocument"):

            return FAMILY_SPREADSHEET

        if document.supportsService("com.sun.star.presentation.PresentationDocument"):

            return FAMILY_PRESENTATION

        if document.supportsService("com.sun.star.drawing.DrawingDocument"):

            return FAMILY_DRAWING

        raise DocumentConversionException("unknown document family: %s" % document)

 

I’m not familiar with Python so have hit a bit of a dead end with googling

 

I’m currently using OpenOffice 4.1, is it worth changing to using LibreOffice?

 

Any help much appreciated

 

Thanks

 

Lee


*** Options: https://wiki.eprints.org/w/Eprints-tech_Mailing_List
*** Archive: https://www.eprints.org/tech.php/
*** EPrints community wiki: https://wiki.eprints.org/