Problem downloading subtitles from OpenSubtitles

Server Version#: 1.18.7.2457

Hello!

Recently, my plex server has simply stopped downloading subtitles. It was working flawlessly prior to this problem. I haven’t updated Plex Server, did not change any configuration, nothing. It simply just stopped working.

I’m using the OpenSubtitles.org agent that comes installed with Plex Server.

Looking into the logs, I get this:

2020-04-08 11:52:51,599 (-4fa01ba0) :  DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.opensubtitles/messaging/function/X0FnZW50S2l0OlNlYXJjaA__/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoyCmRpY3QKZGljdAo2CnMyCmVuczQKbGFuZ2IwczYKbWFudWFsYjBzNwpwcmltYXJ5aTAKczcKdmVyc2lvbnIxCnM2Cmt3YXJnc3M1Ck1vdmllczEwCm1lZGlhX3R5cGU1Cm5zOApwYXJlbnRJRHM0Mwpjb20ucGxleGFwcC5hZ2VudHMuaW1kYjovL3R0NDk5NTc5MD9sYW5nPWVuczQKZ3VpZGIxczUKZm9yY2VzMjMKY29tLnBsZXhhcHAuYWdlbnRzLmltZGJzMTMKcHJpbWFyeV9hZ2VudHMzCjE0OXMyCmlkcjAK
2020-04-08 11:52:51,601 (-4fa01ba0) :  DEBUG (runtime:49) - Received packed state data (80 bytes)
2020-04-08 11:52:51,603 (-4fa01ba0) :  DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.opensubtitles/messaging/function/X0FnZW50S2l0OlNlYXJjaA__/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoyCmRpY3QKZGljdAo2CnMyCmVuczQKbGFuZ2IwczYKbWFudWFsYjBzNwpwcmltYXJ5aTAKczcKdmVyc2lvbnIxCnM2Cmt3YXJnc3M1Ck1vdmllczEwCm1lZGlhX3R5cGU1Cm5zOApwYXJlbnRJRHM0Mwpjb20ucGxleGFwcC5hZ2VudHMuaW1kYjovL3R0NDk5NTc5MD9sYW5nPWVuczQKZ3VpZGIxczUKZm9yY2VzMjMKY29tLnBsZXhhcHAuYWdlbnRzLmltZGJzMTMKcHJpbWFyeV9hZ2VudHMzCjE0OXMyCmlkcjAK
2020-04-08 11:52:51,604 (-4fa01ba0) :  INFO (agentkit:957) - Searching for matches for {'id': '149', 'guid': 'com.plexapp.agents.imdb://tt4995790?lang=en', 'force': True, 'primary_agent': 'com.plexapp.agents.imdb', 'parentID': None}
2020-04-08 11:52:51,605 (-4fa01ba0) :  DEBUG (networking:143) - Requesting 'http://127.0.0.1:32400/library/metadata/149/tree'
2020-04-08 11:52:51,613 (-4fa01ba0) :  DEBUG (model:32) - Loading model with GUID com.plexapp.agents.imdb://tt4995790?lang=en
2020-04-08 11:52:51,614 (-4fa01ba0) :  DEBUG (model:234) - Deserializing from /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Metadata/Movies/6/44f18542bc3c8e904e785a5df3babac27589917.bundle/Contents/com.plexapp.agents.imdb/Info.xml
2020-04-08 11:52:51,650 (-4fa01ba0) :  DEBUG (runtime:88) - Sending packed state data (113 bytes)
2020-04-08 11:52:51,650 (-4fa01ba0) :  DEBUG (runtime:924) - Response: [200] str, 604 bytes
2020-04-08 11:52:52,175 (-4fa01ba0) :  DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.opensubtitles/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMTAKczIKZW5zNApsYW5nYjFzNQpmb3JjZWIwczgKcGVyaW9kaWNzMwoxNDlzNApkYmlkaTAKczcKdmVyc2lvbm5zMTAKcGFyZW50R1VJRG5zOApwYXJlbnRJRHM1Ck1vdmllczEwCm1lZGlhX3R5cGVzNDMKY29tLnBsZXhhcHAuYWdlbnRzLmltZGI6Ly90dDQ5OTU3OTA%40bGFuZz1lbnM0Cmd1aWRzNwo0OTk1NzkwczIKaWRyMAo_
2020-04-08 11:52:52,177 (-4fa01ba0) :  DEBUG (runtime:49) - Received packed state data (1524 bytes)
2020-04-08 11:52:52,180 (-4fa01ba0) :  DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.opensubtitles/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMTAKczIKZW5zNApsYW5nYjFzNQpmb3JjZWIwczgKcGVyaW9kaWNzMwoxNDlzNApkYmlkaTAKczcKdmVyc2lvbm5zMTAKcGFyZW50R1VJRG5zOApwYXJlbnRJRHM1Ck1vdmllczEwCm1lZGlhX3R5cGVzNDMKY29tLnBsZXhhcHAuYWdlbnRzLmltZGI6Ly90dDQ5OTU3OTA@bGFuZz1lbnM0Cmd1aWRzNwo0OTk1NzkwczIKaWRyMAo_
2020-04-08 11:52:52,181 (-4fa01ba0) :  DEBUG (model:32) - Loading model with GUID com.plexapp.agents.imdb://tt4995790?lang=en
2020-04-08 11:52:52,182 (-4fa01ba0) :  DEBUG (model:234) - Deserializing from /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Metadata/Movies/6/44f18542bc3c8e904e785a5df3babac27589917.bundle/Contents/com.plexapp.agents.opensubtitles/Info.xml
2020-04-08 11:52:52,184 (-4fa01ba0) :  DEBUG (networking:143) - Requesting 'http://127.0.0.1:32400/library/metadata/149/tree'
2020-04-08 11:52:52,193 (-4fa01ba0) :  INFO (__init__:53) - Existing token found. Revalidating.
2020-04-08 11:52:54,139 (-4fa01ba0) :  INFO (__init__:79) - Invalid Token.
2020-04-08 11:52:54,261 (-4fa01ba0) :  CRITICAL (agentkit:1091) - Exception in the update function of agent named 'OpenSubtitles.org', called with guid 'com.plexapp.agents.imdb://tt4995790?lang=en' (most recent call last):
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-77cb9455c/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 1089, in _update
    agent.update(obj, media, lang, **kwargs)
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-77cb9455c/OpenSubtitles.bundle/Contents/Code/__init__.py", line 248, in update
    (proxy, token) = opensubtitlesProxy()
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-77cb9455c/OpenSubtitles.bundle/Contents/Code/__init__.py", line 49, in opensubtitlesProxy
    (success, token) = proxyLogin(proxy, username, password)
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-77cb9455c/OpenSubtitles.bundle/Contents/Code/__init__.py", line 60, in proxyLogin
    token = proxy.LogIn(username, password, 'en', OS_PLEX_USERAGENT)['token']
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-77cb9455c/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 108, in <lambda>
    _getitem_           = lambda x, y: x.__getitem__(y),
KeyError: 'token'

2020-04-08 11:52:54,267 (-4fa01ba0) :  DEBUG (model:229) - Serializing to /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Metadata/Movies/6/44f18542bc3c8e904e785a5df3babac27589917.bundle/Contents/com.plexapp.agents.opensubtitles/Info.xml
2020-04-08 11:52:54,275 (-4fa01ba0) :  DEBUG (runtime:88) - Sending packed state data (1557 bytes)
2020-04-08 11:52:54,277 (-4fa01ba0) :  DEBUG (runtime:924) - Response: [200] str, 16 bytes

Does anyone knows how can I solve this problem?

If you need more information just let me know.

It looks like you’re working with the wrong token.

What is this token? Is it a Plex token? OpenSubtitles token? How can I refresh it so it is valid?

Automatic Subtitles requires Plex Pass.

Unless somebody knows something I don’t.

This - however - is free:
https://www.opensubtitles.org/en/search <—pardon my English
https://www.addic7ed.com/
https://subscene.com/

What? Are you sure? Since when? Last week it was automatically downloading subtitles without any issue and without Plex Pass.

1 Like

Well, I can’t say - I have PP and the function is there, of course (for all the good it does - I have much better luck at those links I posted and that’s where I go if I need subs).

I just grabbed that - so we can look through it together and see if something’s changed.

It’s possible, I assume, if you were, or are (and it’s broke) part of a PPer’s ‘Home’, you would, perhaps, have that feature. Maybe it went away or became buggy. Maybe you’re not signed in. Maybe you’re not signed in to the account with the sub feature. Maybe it’s space aliens. The possibilities are (almost) endless.

What you are saying doesn’t make sense. That page doesn’t even say that the automatic subtitle download is available only when purchasing Plex Pass.

I’ve looked a bit into this and renewed my authentication token as explained here. However, that didn’t do the trick. The same error keeps happening.

https://support.plex.tv/articles/subtitle-search/

On demand subtitle search is launching in preview for Plex Pass subscribers. The Plex Media Server owner/admin must have a Plex Pass.

That’s all I know.

Whatever is, or isn’t going on may be related to this:

That too, is an unknown quantity.

Thanks for your reply JuiceWSA. Subtitle on-demand is a different feature, there is no need for a Plex Pass for the agents plugin.

However, maybe they are somehow related, as the thread you pointed seems to also have problems downloading subtitles with on-demand feature. Thanks for your help!

Can anybody found a solution?
I am also having same problem since last week. The opensubtitles plugin no longer work.

1 Like

Hey – also having the same exact issue here. Tracked it to refreshing metadata for a movie. Critical error with the token. Running windows.

What’s the solution?

CRITICAL (core:574) - Exception in the update function of agent named 'OpenSubtitles.org', called with guid 'com.plexapp.agents.imdb://tt1179933?lang=en' (most recent call last):
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-e106a8a91\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\agentkit.py", line 1089, in _update
    agent.update(obj, media, lang, **kwargs)
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-e106a8a91\OpenSubtitles.bundle\Contents\Code\__init__.py", line 248, in update
    (proxy, token) = opensubtitlesProxy()
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-e106a8a91\OpenSubtitles.bundle\Contents\Code\__init__.py", line 33, in opensubtitlesProxy
    (success, token) = proxyLogin(proxy, username, password)
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-e106a8a91\OpenSubtitles.bundle\Contents\Code\__init__.py", line 60, in proxyLogin
    token = proxy.LogIn(username, password, 'en', OS_PLEX_USERAGENT)['token']
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-e106a8a91\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\code\sandbox.py", line 108, in <lambda>
    _getitem_           = lambda x, y: x.__getitem__(y),
KeyError: 'token'

Just fixed this by adding an opensubtitles.org user/pw in Settings > Agents > OpenSubtitles.org

2 Likes

Thank you so much for this, it also worked for me!

Thanks for the possible solution but I’ve always had an Opensubtitles account. Unfortunately this is not a fix for my issues.

Maybe you can try to remove and then add again the credentials to see if it works? Or even try with a different account.

Tryed but no luck.
Since this problem started, i had 2 server update. No change.

BTW,
i created a new opensubtites account and tryed with it, nothing changed.

Thanks! Tried that but it didn’t work. Not sure why “Search” or “More” will not pull up additional subtitles like it did in the past.

Hi, same problem here, I created an acount on opensubtitle.org but it didn’t work either…

The on-demand subtitle search has nothing to do with the opensubtile agent that you can see under Settings - Server - Agents - Movies - Plex Movie
The following only applies to the agent, not to the on-demand subtitles.

If your movie is matched with the TheMovieDatabase agent, it cannot use the opensubtitles agent.

Opensubtitles are getting hammered right now, due to the lockdown and all.
So they very likely have reduced their “anti-leeching” thresholds as well.
After putting in your personal opensubtitles user credentials into the settings of the opensubtitles agent, you need to perform ‘Refresh Metadata’ before you will ever see any difference.

However, due to the above-mentioned anti-leeching measures, do not Refresh Metadata on too many movies at once – lest on the whole library.
If you do that, your IP will getting blocked at opensubtitles almost immediately. Then you’ll have to wait for several hours before the next Refresh atttempt has even a chance of getting a subtitle.

I didn’t see this post last night when I was setting up subtitles. I did a meta refresh last night on about 250 titles after filling in a username and password.

This morning, I switched to use IMDB instead of TheMovieDatabase based on your post above, and ran a Refresh Metadata on one title and it is greyed out still after almost an hour. I am guessing it is still running?

Console errors:
Error issuing curl_easy_perform(handle): 28
Error refreshing metadata for com.plexapp.agents.imdb://tt0840361?lang=en