unoconv / unoserver

MIT License
552 stars 77 forks source link

Problems with Unoserver #28

Closed bandward closed 1 year ago

bandward commented 2 years ago

WE are new to python and are currently using unoconv to convert .odt to pdf.

We installed the latest new unoserver/unoconvert packages.

WE set the $PYTHONPATH TO /usr/local/lib/python3.9/site-packages/uno

When we run the following command: unoconvert -h pdf CONVERT_TO /docdata/tex/templates/generatetmp/2v5bolq.odt /docdata/tex/templates/generatetmp/2v5bolq.pdf

we are getting lots of errors of the print command in base.py. print commands were like this:

print 'new attri:' and shouldn't they be print('new attrib:) (with pararentheses)?)

I fiixed the print errors and now I am getting:

/usr/local/lib/python3.9/site-packages/uno$ unoconvert -h pdf CONVERT_TO /docdata/tex/templates/generatetmp/2v5bolq.odt /docdata/tex/templates/generatetmp/2v5bolq.pdf Traceback (most recent call last): File "/usr/local/bin/unoconvert", line 5, in from unoserver.converter import main File "/usr/local/lib/python3.9/site-packages/unoserver/converter.py", line 2, in import uno File "/usr/local/lib/python3.9/site-packages/uno/init.py", line 4, in from base import Element, Css, Payload, UnoBaseFeature, UnoBaseField File "/usr/local/lib/python3.9/site-packages/uno/base.py", line 11, in PAYLOAD_TAGS = helpers.minus(NORMAL_TAGS, ABNORMAL_TAGS) File "/usr/local/lib/python3.9/site-packages/uno/helpers.py", line 16, in wrapper if kwargs.has_key('return_type'): AttributeError: 'dict' object has no attribute 'has_key'

Is there something that we are missing as to why this is not working?
Is this a product that can be used on our website?

Barb Ward

regebro commented 2 years ago

I think you have installed the uno package from pypi. You don't need to do that. That package is entirely unrelated to unoserver. The uno package to use is included with Libreoffice.