Diaoul / subliminal

Subtitles, faster than your thoughts
http://subliminal.readthedocs.org
MIT License
2.39k stars 312 forks source link

Testing for the new release #1083

Closed getzze closed 2 months ago

getzze commented 4 months ago

I am creating this issue to keep track of users that can help testing the new release. Like this you can be notified when we land the release candidate.

getzze commented 4 months ago

@pitsi @gene1wood @pannal @RaXorX @woj-tek @kaoneko @Diaoul @ptrcnull @ratoaq2

pitsi commented 4 months ago

I no longer use subliminal or any other similar app because I no longer have a library of movies/series (my network server died 9 months ago and I won't be able to replace it), so I won't be able to help. Good luck to anyone who can :)

DerouineauNicolas commented 3 months ago

I'm interested to test the new release ! We're using the subliminal python API to download subtitles in this project, and pip is used for subliminal installation. Btw, I followed the recent project handover, and I'm really happy that people are commiting to this projet again.

getzze commented 3 months ago

Great! For now the updates are in the develop branch. It can be installed with:

pipx install git+https://github.com/Diaoul/subliminal.git@develop

Or you can wait for the next release.

RiRomain commented 3 months ago

Hey, I can help with the testing, maybe we should organize a discord room to align on what need to be done. I actively use version 2.1.1-dev currently, working well so far (for movies and tv show, download in EN + CN).

Lovecraft-github commented 3 months ago

I can test too. Last dev gives me error See https://github.com/Diaoul/subliminal/issues/1063#issuecomment-2133418871

Lovecraft-github commented 3 months ago

You must already seen the results in the other threat but to summarize- The opensubtitlescom is working fine, download subtitles and even record the download in the site when i used my credentials. argenteam gives 404, because it is down, but this is a known issue so no much talk about it, I simply put it in disabled_providers. After that I test several movies and TV shows (some popular, some more rare) with very good results. The only errors remaining that I noticed are:

When trying to refine with metadata

ERROR:subliminal.utils:Unexpected error. Failed to refine video 'movie.mp4'
Traceback (most recent call last):
  File "/home/user/.local/share/pipx/venvs/subliminal/lib/python3.12/site-packages/subliminal/core.py", line 552, in refine
    refiner_manager[refiner].plugin(video, **dict((refiner_configs or {}).get(refiner, {}), **kwargs))
    ~~~~~~~~~~~~~~~^^^^^^^^^
  File "/home/user/.local/share/pipx/venvs/subliminal/lib/python3.12/site-packages/stevedore/extension.py", line 340, in __getitem__
    return self._extensions_by_name[name]
           ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
KeyError: 'metadata

And when trying to use my key from omdb

INFO:subliminal.core:Refining video with omdb
ERROR:subliminal.utils:HTTP error 401. Failed to refine video 'movie.mp4'
Traceback (most recent call last):
  File "/home/user/.local/share/pipx/venvs/subliminal/lib/python3.12/site-packages/subliminal/core.py", line 552, in refine
    refiner_manager[refiner].plugin(video, **dict((refiner_configs or {}).get(refiner, {}), **kwargs))
  File "/home/user/.local/share/pipx/venvs/subliminal/lib/python3.12/site-packages/subliminal/refiners/omdb.py", line 161, in refine
    results = search(video.title, 'movie', video.year)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/share/pipx/venvs/subliminal/lib/python3.12/site-packages/decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/share/pipx/venvs/subliminal/lib/python3.12/site-packages/dogpile/cache/region.py", line 1634, in get_or_create_for_user_func
    return self.get_or_create(
           ^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/share/pipx/venvs/subliminal/lib/python3.12/site-packages/dogpile/cache/region.py", line 1094, in get_or_create
    with Lock(
  File "/home/user/.local/share/pipx/venvs/subliminal/lib/python3.12/site-packages/dogpile/lock.py", line 185, in __enter__
    return self._enter()
           ^^^^^^^^^^^^^
  File "/home/user/.local/share/pipx/venvs/subliminal/lib/python3.12/site-packages/dogpile/lock.py", line 94, in _enter
    generated = self._enter_create(value, createdtime)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/share/pipx/venvs/subliminal/lib/python3.12/site-packages/dogpile/lock.py", line 178, in _enter_create
    return self.creator()
           ^^^^^^^^^^^^^^
  File "/home/user/.local/share/pipx/venvs/subliminal/lib/python3.12/site-packages/dogpile/cache/region.py", line 1048, in gen_value
    created_value = creator(
                    ^^^^^^^^
  File "/home/user/.local/share/pipx/venvs/subliminal/lib/python3.12/site-packages/subliminal/refiners/omdb.py", line 82, in search
    results = omdb_client.search(title, type, year)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/share/pipx/venvs/subliminal/lib/python3.12/site-packages/subliminal/refiners/omdb.py", line 64, in search
    r.raise_for_status()
  File "/home/user/.local/share/pipx/venvs/subliminal/lib/python3.12/site-packages/requests/models.py", line 1024, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: http://www.omdbapi.com/?r=json&v=1&s=Crash&type=movie&y=2005&page=1

My key seems to work fine in the test link that they send in the request respond email

The rest of the logs seems pretty clean INFO and DEBUG of operations without problem.

Lovecraft-github commented 3 months ago

And while I was writing, a new pull to cover the issues. ;-)

getzze commented 3 months ago

All the providers have been fixed, please test!

Also to test, #1084 introduced a way to use a configuration file (in TOML format) with the CLI. It's not documented yet but there is an example file. The CLI will look in the default configuration folder for a file $USER_CONFIG_PATH/subliminal.toml or you can specify the path in the CLI with: subliminal --config path/to/file.toml download video.mkv

getzze commented 3 months ago

This is still in the develop branch.

Lovecraft-github commented 3 months ago

Ok, I made a subliminal.toml with my usernames and passwords as example one and placed it in ~/.config/subliminal/subliminal.toml.

subliminal --debug download -p opensubtitlescom "The Matrix"

omitted username and password, force, languages (es and en), etc because are all in the toml file, except TMDB (I don't have one)

Error: Invalid value for '-r' / '--refiner': 'metadata' is not one of 'hash', 'omdb', 'tmdb', 'tvdb'.

After removing metadata the configuration file seems to load just fine.

subliminal --debug download -p opensubtitlescom "The Matrix"

Using configuration file at /home/user/.config/subliminal/subliminal.toml

Download both subtitles, all seems ok

Same with addic7ed and the simpsons episodes.

Trying with real files without specific provider.

Some logging errors and sometimes guessing encoding.

Attaching full log with an episode with both error types

full log.text.zip

getzze commented 3 months ago

Thanks for testing and providing the logs, it's very useful! There are quite a few bugs, especially that Addic7ed and Gestdown are downloading corrupted subtitles for this episode.

On 8 June 2024 02:04:50 GMT+01:00, Lovecraft-github @.***> wrote:

Ok, I made a subliminal.toml with my usernames and passwords as example one and placed it in ~/.config/subliminal/subliminal.toml.

subliminal --debug download -p opensubtitlescom "The Matrix"

omitted username and password, force, languages (es and en), etc because are all in the toml file, except TMDB (I don't have one)

Error: Invalid value for '-r' / '--refiner': 'metadata' is not one of 'hash', 'omdb', 'tmdb', 'tvdb'.

After removing metadata the configuration file seems to load just fine.

subliminal --debug download -p opensubtitlescom "The Matrix"

Using configuration file at /home/user/.config/subliminal/subliminal.toml

Download both subtitles, all seems ok

Same with addic7ed and the simpsons episodes.

Trying with real files without specific provider.

Some logging errors and sometimes guessing encoding.

Attaching full log with an episode with both types

full log.text.zip

-- Reply to this email directly or view it on GitHub: https://github.com/Diaoul/subliminal/issues/1083#issuecomment-2155736605 You are receiving this because you authored the thread.

Message ID: @.***>

getzze commented 2 months ago

Error: Invalid value for '-r' / '--refiner': 'metadata' is not one of 'hash', 'omdb', 'tmdb', 'tvdb'.

Tracked in #1126, you should see this error if you are using subliminal with python 3.12. A quick workaround for now is to manually install setuptools in subliminal venv.

getzze commented 2 months ago

all the rest is solved hopefully.

Hey, I can help with the testing, maybe we should organize a discord room to align on what need to be done. I actively use version 2.1.1-dev currently, working well so far (for movies and tv show, download in EN + CN).

I don't use discord so I would personally prefer a Matrix room.

Lovecraft-github commented 2 months ago

Error: Invalid value for '-r' / '--refiner': 'metadata' is not one of 'hash', 'omdb', 'tmdb', 'tvdb'.

Tracked in #1126, you should see this error if you are using subliminal with python 3.12. A quick workaround for now is to manually install setuptools in subliminal venv.

How can I do that?

I tried pip -U, and it said that I need to use pipx or pacman. pacman has python-setuptools already installed and pipx said "No apps associated with package setuptools or its dependencies. If you are attempting to install a library, pipx should not be used. Consider using pip or a similar tool instead."

getzze commented 2 months ago

If you installed subliminal with pipx, you can try pipx inject subliminal setuptools to install setuptools in the subliminal venv.

On 18 June 2024 04:50:26 GMT+01:00, Lovecraft-github @.***> wrote:

Error: Invalid value for '-r' / '--refiner': 'metadata' is not one of 'hash', 'omdb', 'tmdb', 'tvdb'.

Tracked in #1126, you should see this error if you are using subliminal with python 3.12. A quick workaround for now is to manually install setuptools in subliminal venv.

How can I do that?

I tried pip -U, and it said that I need to use pipx or pacman. pacman has python-setuptools already installed and pipx said "No apps associated with package setuptools or its dependencies. If you are attempting to install a library, pipx should not be used. Consider using pip or a similar tool instead."

-- Reply to this email directly or view it on GitHub: https://github.com/Diaoul/subliminal/issues/1083#issuecomment-2174932656 You are receiving this because you authored the thread.

Message ID: @.***>

Lovecraft-github commented 2 months ago

That worked perfectly. The error in metadata is gone. Also, the Grimsburg episode that had the errors now download without problems.

I test others movies and episodes that give me errors in the past and all have clean debug-info now.

getzze commented 2 months ago

This issue can be closed after the new release. Thank you all for testing, it helped a lot.

woj-tek commented 2 months ago

Congrats on new release!

Started new discussion to restore it in homebrew: https://github.com/orgs/Homebrew/discussions/5459

woj-tek commented 2 months ago

@getzze I'm not very fluent in python and while trying to restore sublimal to homebrew I ran into issue with dependencies. I saw pyproject.toml file but it seems it only list major dependencies. Is there a way to get all (including transitive) dependencies that are required by subliminal? something akin "dependencies.lock" file with list of all resolved dependencies that required and it's versions? My google-foo doesn't return anything useful :(

getzze commented 2 months ago

There is no consensus on a "dependency.lock" file, see the rejected PEP https://peps.python.org/pep-0665/

But you can use this tool for instance to generate such a list: https://github.com/jazzband/pip-tools

On 25 June 2024 16:40:22 GMT+01:00, Wojtek @.***> wrote:

@getzze I'm not very fluent in python and while trying to restore sublimal to homebrew I ran into issue with dependencies. I saw pyproject.toml file but it seems it only list major dependencies. Is there a way to get all (including transitive) dependencies that are required by subliminal? something akin "dependencies.lock" file with list of all resolved dependencies that required and it's versions? My google-foo doesn't return anything useful :(

-- Reply to this email directly or view it on GitHub: https://github.com/Diaoul/subliminal/issues/1083#issuecomment-2189294456 You are receiving this because you were mentioned.

Message ID: @.***>

woj-tek commented 2 months ago

In the end I converted dependencies to poetry format just to easily get list of all transitive dependencies so I could proceed. A bit hacky but it got job done :-)