Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LooseVersion deprecated #593

Open
testote opened this issue Apr 2, 2022 · 1 comment
Open

LooseVersion deprecated #593

testote opened this issue Apr 2, 2022 · 1 comment

Comments

@testote
Copy link

testote commented Apr 2, 2022

distutils libraries has been replaced for other libraries. Thus,

ImportError: cannot import name 'LooseVersion' from 'distutils' (/usr/lib/python3.10/distutils/__init__.py)

disutils'.LooseVersion has been replaced by packaging.version but it is not compatible. Thus,

Traceback (most recent call last):
  File "/usr/bin/unoconv", line 848, in connect
    unocontext = resolver.resolve("uno:%s" % op.connection)
uno.com.sun.star.connection.NoConnectException: Connector : couldn't connect to socket (Connection refused) /build/libreoffice-fresh/src/libreoffice-7.3.1.3/io/source/connector/connector.cxx:117

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/unoconv", line 1436, in <module>
    main()
  File "/usr/bin/unoconv", line 1350, in main
    convertor = Convertor()
  File "/usr/bin/unoconv", line 827, in __init__
    unocontext = self.connect(resolver)
  File "/usr/bin/unoconv", line 860, in connect
    if product.ooName not in ('LibreOffice', 'LOdev') or LooseVersion(product.ooSetupVersion) <= LooseVersion('3.3'):
TypeError: 'module' object is not callable

We may loose some retrocompatibility but it works if:
19 from distutils.version import LooseVersion
and
870 ... or LooseVersion(product.ooSetupVersion) <= LooseVersion('3.3') ...
are removed.

Cheers.

@rcrath
Copy link

rcrath commented Dec 5, 2022

I hope this can be fixed properly while unoconver/unoserver are not feature equivalent yet (I need wildcards for e.g.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants