unoconv / unoserver

MIT License
495 stars 69 forks source link

AttributeError: 'NoneType' object has no attribute 'supportsService' while converting to png/jpg #72

Closed shaheerxt closed 10 months ago

shaheerxt commented 1 year ago

hi, please check and let me know what i'm missing-

unoconvert --convert-to jpg 'abcd1216.pdf' 'abcd1216.jpg'
INFO:unoserver:Starting unoconverter.
INFO:unoserver:Opening abcd1216.pdf
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/unoserver/converter.py", line 159, in convert
    import_type = get_doc_type(document)
  File "/usr/local/lib/python3.8/dist-packages/unoserver/converter.py", line 42, in get_doc_type
    if doc.supportsService(t):
AttributeError: 'NoneType' object has no attribute 'supportsService'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/unoconvert", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/unoserver/converter.py", line 247, in main
    result = converter.convert(
  File "/usr/local/lib/python3.8/dist-packages/unoserver/converter.py", line 204, in convert
    document.close(True)
AttributeError: 'NoneType' object has no attribute 'close'
regebro commented 1 year ago

Others have had similar problems, and that got solved by installing the libreoffice-filters package with your operating systems package manager. See #65