pcroland / deew

Dolby Encoding Engine Wrapper
https://deew.dev
MIT License
195 stars 20 forks source link

Unrecognized DEE version #57

Closed PatrBal closed 6 months ago

PatrBal commented 6 months ago

Hi, thank you very much for the very useful package.

Description of the the bug

After upgrading to deew 3.2.0, I got the following error:

Traceback (most recent call last):
  File "/opt/homebrew/bin/deew", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/deew/__main__.py", line 1005, in main
    job.result()
  File "/opt/homebrew/Cellar/python@3.11/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.11/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/opt/homebrew/Cellar/python@3.11/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/deew/__main__.py", line 480, in encode
    if aformat != 'thd' and version.parse(simplens.dee_version) >= version.parse('5.2.0') and not encoding_step:
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/packaging/version.py", line 54, in parse
    return Version(version)
           ^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/packaging/version.py", line 200, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
packaging.version.InvalidVersion: Invalid version: '5.2.0-master'

The problem seems to be that deew sees my DEE version as 5.2.0-master and no longer accept it.

Version

No error shows up with deew 3.0.1 or even with deew 3.1.0. The error appears with version deew 3.1.1 or higher.

OS macOS Sonoma.

pcroland commented 6 months ago

When you run dee, does it say dee, Version 5.2.0-master, [somedate]?

PatrBal commented 6 months ago

Yes, indeed: dee, Version 5.2.0-master, May 15 2022

pcroland commented 6 months ago

Please try 3.2.1

PatrBal commented 6 months ago

Thank you very much for the very quick fix.

3.2.1 displays DEE version │ 5.2.0 in the Encoding summary, instead of DEE version │ 5.2.0-master and seems to be working fine (I currently run an encode with 3.2.1).

Thanks again and best regards.

pcroland commented 6 months ago

Btw I think you changed DEE itself. 5.2.0-master shouldn't have worked with previous versions either.

PatrBal commented 6 months ago

Btw I think you changed DEE itself. 5.2.0-master shouldn't have worked with previous versions either.

I didn't. It always has been the same old DEE coming with the Dolby Media Encoder application for macOS. I have been successfully encoding with it together with deew 3.0.1 for months...

pcroland commented 6 months ago

That's weird. I updated the packages in 3.1.0, 3.1.1 was only different for the windows standalone build. If packaging.version's behaviour has changed, the code should be broken since 3.1.0

PatrBal commented 6 months ago

Yes, my bad. When I tested with 3.1.0, the intermediate file was already existing, so it worked but it may have skipped the dee version test, in that run. However, 3.0.1 has been running fine for months with that dee 5.2.0-master version...