EPrints Technical Mailing List Archive

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

Message: #09725


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

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


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