# Beta for OpenSubtitles metadata agent improvement

**URL:** https://forums.plex.tv/t/beta-for-opensubtitles-metadata-agent-improvement/60938
**Category:** Dev/API Corner
**Tags:** scanner-agent-dev
**Created:** [March 20, 2014, 12:44am UTC](https://forums.plex.tv/t/beta-for-opensubtitles-metadata-agent-improvement/60938 "2014-03-20T00:44:29Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![oncleben31](https://avatars.discourse-cdn.com/v4/letter/o/838e76/32.png) [@oncleben31](https://forums.plex.tv/u/oncleben31)
#### Post date: [March 20, 2014, 12:44am UTC](https://forums.plex.tv/t/beta-for-opensubtitles-metadata-agent-improvement/60938/1 "2014-03-20T00:44:29Z")

</div>

As you know, the current version of the OpenSubtitles metadata agent is not really efficient. After investigating and discussing with the community I've decide to code a prototype to demonstrate we can have better automatic results by making some consistency check on metadata to find the best subtitle to download.

&nbsp;

You can fin in the following fork on Github, my code and a description of the new algorithm. If you want to participate to the improvement go download and test this fork. Instruction are in the README file and you can ask in this thread if you need help.

&nbsp;

**DON'T TEST THIS METADATA AGENT ON YOUR PRODUCTION SERVER. THERE IS A LITTLE RISK THIS SCREW-UP YOUR SUBS.**

&nbsp;

Github fork with explanations :&nbsp;[https://github.com/oncleben31/OpenSubtitles.bundle](https://github.com/oncleben31/OpenSubtitles.bundle)

&nbsp;

I'm listening your comments ant your tests results.

&nbsp;

&nbsp;

Release history:

&nbsp;

# RC2 (02/04/2014):

&nbsp; &nbsp;- release note:

&nbsp; &nbsp; &nbsp; &nbsp; \*&nbsp;Add a filter on the name of a movie or TV show if the primary agent use English language

&nbsp; &nbsp; &nbsp; &nbsp; \*&nbsp;Add a filter on the number of the episode.

&nbsp; &nbsp; &nbsp; &nbsp; \*&nbsp;Fix some bugs

&nbsp; &nbsp;- Limitations:

&nbsp; &nbsp; &nbsp; &nbsp; \* No IMDB id search if hash/size don't return acceptable answers

&nbsp; &nbsp; &nbsp; &nbsp; \* Hearing Impared pref is useless for the moment

&nbsp; &nbsp; &nbsp; &nbsp; \* The API key for TheTVDB is not used due to XML.ElementFromString errors

&nbsp;

&nbsp;

# RC1 (20/03/2014):

​ &nbsp; -&nbsp;First release

&nbsp; &nbsp;- Limitations:

&nbsp; &nbsp; &nbsp; &nbsp; \* No IMDB id search if hash/size don't return acceptable answers

&nbsp; &nbsp; &nbsp; &nbsp; \* Hearing Impared pref is useless for the moment

&nbsp; &nbsp; &nbsp; &nbsp; \* The API key for TheTVDB is not used due to XML.ElementFromString errors

---

<div class="post-metadata">

### Author: ![oncleben31](https://avatars.discourse-cdn.com/v4/letter/o/838e76/32.png) [@oncleben31](https://forums.plex.tv/u/oncleben31)
#### Post date: [March 22, 2014, 8:45pm UTC](https://forums.plex.tv/t/beta-for-opensubtitles-metadata-agent-improvement/60938/2 "2014-03-22T20:45:13Z")

</div>

Any body to beta test ?

---

<div class="post-metadata">

### Author: ![oncleben31](https://avatars.discourse-cdn.com/v4/letter/o/838e76/32.png) [@oncleben31](https://forums.plex.tv/u/oncleben31)
#### Post date: [March 24, 2014, 9:04am UTC](https://forums.plex.tv/t/beta-for-opensubtitles-metadata-agent-improvement/60938/3 "2014-03-24T09:04:06Z")

</div>

If you don't want to take some risks by beta testing it. Can you help me by giving me some case where current official version didn't suceed to fetch the good subtitle.&nbsp;

I need the following information :

&nbsp;- hash size of the video file (in the Logs or by dragging it in the OpenSubtitles.org search form on the web site

&nbsp;- file size Logs or file information

&nbsp;- primary agent used and associated language

&nbsp;- language of the subs

&nbsp;- vidoe file name

&nbsp;- movie or show/episode name

---

<div class="post-metadata">

### Author: ![Coil](https://avatars.discourse-cdn.com/v4/letter/c/bb73d2/32.png) [@Coil](https://forums.plex.tv/u/Coil)
#### Post date: [March 25, 2014, 9:22pm UTC](https://forums.plex.tv/t/beta-for-opensubtitles-metadata-agent-improvement/60938/4 "2014-03-25T21:22:39Z")

</div>

Hello. Great initiative. I always read about how weak the Opensubtitles plugin seem to be. :)

I haven't tried your agent improvement, but I'll give some feedback on what I've read.

I think you have done a thorough job analyzing how to interpret the data from Opensubtitles, and you have detailed it quite nicely in the readme. I think though that it's too complex for anyone not familiar with how the Opensubtitles and the site.

I think you should use another word instead of "mockup". Mockup is mostly used for non-working graphic prototypes. I was mislead first and thought that you had only detailed how you wanted it to work.

I think a really good thing to get some feedback would be to provide some examples on where this agent gives better results than the existing one.

Last but not least, I think sending a pull request to sander1 or sending a pm directly to him would give good response from someone who is knowledgeable in the code and the site. There is a developer chat available as well for easier communication. Sander will help you I think.

Finally. Good initiative! As far as I've understood, there is a lot of room for improvement in the original agent.

Cheers!

---

<div class="post-metadata">

### Author: ![oncleben31](https://avatars.discourse-cdn.com/v4/letter/o/838e76/32.png) [@oncleben31](https://forums.plex.tv/u/oncleben31)
#### Post date: [March 25, 2014, 11:14pm UTC](https://forums.plex.tv/t/beta-for-opensubtitles-metadata-agent-improvement/60938/5 "2014-03-25T23:14:23Z")

</div>

Thanks for your comments, and I agree I've change the title of the subject.

Sander and Elan are aware of my work but I don't want to ask for a pull request now since I want some beta testing to get an agent with more maturity. I've already identified limitations and bugs.

---

<div class="post-metadata">

### Author: ![ajsz](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@ajsz](https://forums.plex.tv/u/ajsz)
#### Post date: [March 28, 2014, 1:38pm UTC](https://forums.plex.tv/t/beta-for-opensubtitles-metadata-agent-improvement/60938/6 "2014-03-28T13:38:48Z")

</div>

Hey guys!

I am really thrilled to find a thread like this. I also have problems with the current "official" agent, so I tried this one. I installed it according to your GitHub description. I have already registered at opensubtitles, my preferred languages are English and Hungarian.

I was trying to download subtitles for Sherlock S03E03, but I did not succeed. I have refreshed the show multiple times on the web inteface with the little round arrow, but unfortunately nothing happened with this particular episode. However, it did download the correct subtitles for S03E02, but the "official" agent was able to do that too. It's not like these subtitles are missing from opensubtitles or anything: if you do a manual search, you can clearly see that they are there.

I am uploading the log files (I hope these are the ones that you need). If you need any further information, I am happy to give those too.

Thanks again for your contribution! :) Looking forward to your reply.

ajsz

---

<div class="post-metadata">

### Author: ![oncleben31](https://avatars.discourse-cdn.com/v4/letter/o/838e76/32.png) [@oncleben31](https://forums.plex.tv/u/oncleben31)
#### Post date: [March 28, 2014, 3:22pm UTC](https://forums.plex.tv/t/beta-for-opensubtitles-metadata-agent-improvement/60938/7 "2014-03-28T15:22:18Z")

</div>

Thanks for your contribution, I will look into your logs and keep you informed.

---

<div class="post-metadata">

### Author: ![oncleben31](https://avatars.discourse-cdn.com/v4/letter/o/838e76/32.png) [@oncleben31](https://forums.plex.tv/u/oncleben31)
#### Post date: [March 31, 2014, 10:04pm UTC](https://forums.plex.tv/t/beta-for-opensubtitles-metadata-agent-improvement/60938/8 "2014-03-31T22:04:34Z")

</div>

I've look at the logs, and the metadata agent didn't find subs because OpenSubtitles seems to have no entries with the couple hash/size of your file.

Currently my metadata agent is only searching by using this method, but addition of other methods is in progress.

Are you sure you are using my metadata agent ? I didn't recognize the Logs messages.

---

<div class="post-metadata">

### Author: ![ajsz](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@ajsz](https://forums.plex.tv/u/ajsz)
#### Post date: [March 31, 2014, 10:16pm UTC](https://forums.plex.tv/t/beta-for-opensubtitles-metadata-agent-improvement/60938/9 "2014-03-31T22:16:58Z")

</div>

Dear oncleben31,

Thank you for your reply. I'm fairly sure I did everything correctly: downloaded the zip from your github, extracted it to the folder, deleted the old one and renamed the new to the correct foldername, then restarted both the server and the client, and did a refresh on the series multiple times. Is this the correct way to do it?

I will reinstall your agent and upload some more logs later today maybe with different shows.

---

<div class="post-metadata">

### Author: ![oncleben31](https://avatars.discourse-cdn.com/v4/letter/o/838e76/32.png) [@oncleben31](https://forums.plex.tv/u/oncleben31)
#### Post date: [April 1, 2014, 4:22pm UTC](https://forums.plex.tv/t/beta-for-opensubtitles-metadata-agent-improvement/60938/10 "2014-04-01T16:22:44Z")

</div>

It seems you do it right.

---

<div class="post-metadata">

### Author: ![oncleben31](https://avatars.discourse-cdn.com/v4/letter/o/838e76/32.png) [@oncleben31](https://forums.plex.tv/u/oncleben31)
#### Post date: [April 2, 2014, 1:18pm UTC](https://forums.plex.tv/t/beta-for-opensubtitles-metadata-agent-improvement/60938/11 "2014-04-02T13:18:35Z")

</div>

RC2 released. See first post.

Next release will have other search methods.

---

<div class="post-metadata">

### Author: ![Sebhash](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@Sebhash](https://forums.plex.tv/u/Sebhash)
#### Post date: [April 4, 2014, 12:24pm UTC](https://forums.plex.tv/t/beta-for-opensubtitles-metadata-agent-improvement/60938/12 "2014-04-04T12:24:49Z")

</div>

Hi,

Just installed it on a fresh new install but apparently can't find anything... did i miss something ?

Looking for tV show "Vikings" S02E06 (Id&nbsp;260449 on thetvdb)

Agent config is to french then english.

Some subtitles exist :&nbsp;[http://www.opensubtitles.org/en/search/imdbid-3358060/sublanguageid-eng,fre/moviename-vikings](http://www.opensubtitles.org/en/search/imdbid-3358060/sublanguageid-eng,fre/moviename-vikings)

Here's the log

```
2014-04-04 14:12:08,134 (7f6abe7fc700) : DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.opensubtitles/messaging/function/X0FnZW50S2l0OlNlYXJjaA__/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoyCmRpY3QKZGljdAo0CnMyCmZyczQKbGFuZ3M3ClRWX1Nob3dzMTAKbWVkaWFfdHlwZWIwczYKbWFudWFscjEKczYKa3dhcmdzMwpzNDcKY29tLnBsZXhhcHAuYWdlbnRzLnRoZXR2ZGI6Ly8yNjA0NDkvMi82P2xhbmc9ZnJzNApndWlkYjFzNQpmb3JjZXMyNgpjb20ucGxleGFwcC5hZ2VudHMudGhldHZkYnMxMwpwcmltYXJ5X2FnZW50cjAK
2014-04-04 14:12:08,138 (7f6abe7fc700) : DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.opensubtitles/messaging/function/X0FnZW50S2l0OlNlYXJjaA__/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoyCmRpY3QKZGljdAo0CnMyCmZyczQKbGFuZ3M3ClRWX1Nob3dzMTAKbWVkaWFfdHlwZWIwczYKbWFudWFscjEKczYKa3dhcmdzMwpzNDcKY29tLnBsZXhhcHAuYWdlbnRzLnRoZXR2ZGI6Ly8yNjA0NDkvMi82P2xhbmc9ZnJzNApndWlkYjFzNQpmb3JjZXMyNgpjb20ucGxleGFwcC5hZ2VudHMudGhldHZkYnMxMwpwcmltYXJ5X2FnZW50cjAK
2014-04-04 14:12:08,139 (7f6abe7fc700) : INFO (agentkit:915) - Searching for matches for {'guid': 'com.plexapp.agents.thetvdb://260449/2/6?lang=fr', 'force': True, 'primary_agent': 'com.plexapp.agents.thetvdb'}
2014-04-04 14:12:08,141 (7f6abe7fc700) : DEBUG (model:32) - Loading model with GUID com.plexapp.agents.thetvdb://260449/2/6?lang=fr
2014-04-04 14:12:08,142 (7f6abe7fc700) : DEBUG (model:223) - Deserializing from /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Metadata/TV Shows/1/dfe4797709a007e461a4b801a411064ead8bc32.bundle/Contents/com.plexapp.agents.thetvdb/Info.xml
2014-04-04 14:12:08,162 (7f6abe7fc700) : DEBUG (runtime:918) - Response: [200] str, 600 bytes
2014-04-04 14:12:08,175 (7f6abe7fc700) : DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.opensubtitles/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKNwpzMgpmcnM0CmxhbmdiMXM1CmZvcmNlczQ1CmNvbS5wbGV4YXBwLmFnZW50cy50aGV0dmRiOi8vMjYwNDQ5LzI%40bGFuZz1mcnMxMApwYXJlbnRHVUlEczcKVFZfU2hvd3MxMAptZWRpYV90eXBlczQKMTY3M3M0CmRiaWRzNDcKY29tLnBsZXhhcHAuYWdlbnRzLnRoZXR2ZGI6Ly8yNjA0NDkvMi82P2xhbmc9ZnJzNApndWlkczQKbnVsbHMyCmlkcjAK
2014-04-04 14:12:08,178 (7f6abe7fc700) : DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.opensubtitles/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKNwpzMgpmcnM0CmxhbmdiMXM1CmZvcmNlczQ1CmNvbS5wbGV4YXBwLmFnZW50cy50aGV0dmRiOi8vMjYwNDQ5LzI@bGFuZz1mcnMxMApwYXJlbnRHVUlEczcKVFZfU2hvd3MxMAptZWRpYV90eXBlczQKMTY3M3M0CmRiaWRzNDcKY29tLnBsZXhhcHAuYWdlbnRzLnRoZXR2ZGI6Ly8yNjA0NDkvMi82P2xhbmc9ZnJzNApndWlkczQKbnVsbHMyCmlkcjAK
2014-04-04 14:12:08,181 (7f6abe7fc700) : DEBUG (model:32) - Loading model with GUID com.plexapp.agents.thetvdb://260449/2/6?lang=fr
2014-04-04 14:12:08,182 (7f6abe7fc700) : DEBUG (model:223) - Deserializing from /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Metadata/TV Shows/1/dfe4797709a007e461a4b801a411064ead8bc32.bundle/Contents/com.plexapp.agents.opensubtitles/Info.xml
2014-04-04 14:12:08,184 (7f6abe7fc700) : DEBUG (networking:172) - Requesting 'http://127.0.0.1:32400/library/metadata/1673/tree'
2014-04-04 14:12:08,335 (7f6abe7fc700) : INFO ( __init__ :46) - Looking for match for GUID 7dc91bfabbf718a0 and size 863274590
2014-04-04 14:12:08,410 (7f6abe7fc700) : INFO ( __init__ :66) - No subtitles available for language fre
2014-04-04 14:12:08,411 (7f6abe7fc700) : INFO ( __init__ :46) - Looking for match for GUID 7dc91bfabbf718a0 and size 863274590
2014-04-04 14:12:08,487 (7f6abe7fc700) : INFO ( __init__ :66) - No subtitles available for language eng
2014-04-04 14:12:08,490 (7f6abe7fc700) : DEBUG (model:218) - Serializing to /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Metadata/TV Shows/1/dfe4797709a007e461a4b801a411064ead8bc32.bundle/Contents/com.plexapp.agents.opensubtitles/Info.xml
2014-04-04 14:12:08,493 (7f6abe7fc700) : DEBUG (runtime:918) - Response: [200] str, 16 bytes
```

and of course nothing in the Info.xml

```
<?xml version='1.0' encoding='utf-8'?>
```

Thanks.

Seb.

---

<div class="post-metadata">

### Author: ![mhugo](https://avatars.discourse-cdn.com/v4/letter/m/edb3f5/32.png) [@mhugo](https://forums.plex.tv/u/mhugo)
#### Post date: [April 5, 2014, 8:35pm UTC](https://forums.plex.tv/t/beta-for-opensubtitles-metadata-agent-improvement/60938/13 "2014-04-05T20:35:54Z")

</div>

Hi,

Getting exception when trying to download

2014-04-05 22:29:30,752 (-b239470) :&nbsp; CRITICAL (agentkit:974) - Exception in the update function of agent named 'OpenSubtitles.org', called with guid 'com.plexapp.agents.imdb://tt1408101?lang=sv' (most recent call last):  
&nbsp; File "/share/MD0\_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 972, in \_update  
&nbsp;&nbsp;&nbsp; agent.update(obj, media, lang)  
&nbsp; File "/root/Library/Plex Media Server/Plug-ins/OpenSubtitles.bundle/Contents/Code/\_\_init\_\_.py", line 86, in update  
&nbsp;&nbsp;&nbsp; fetchSubtitles(proxy, token, part, metadata.id)  
&nbsp; File "/root/Library/Plex Media Server/Plug-ins/OpenSubtitles.bundle/Contents/Code/\_\_init\_\_.py", line 63, in fetchSubtitles  
&nbsp;&nbsp;&nbsp; subData = Archive.GzipDecompress(subGz)  
&nbsp; File "/share/MD0\_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/utilkit.py", line 58, in GzipDecompress  
&nbsp;&nbsp;&nbsp; return self.\_core.data.archiving.gzip\_decompress(data)  
&nbsp; File "/share/MD0\_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/data.py", line 100, in gzip\_decompress  
&nbsp;&nbsp;&nbsp; ret = gzipper.read()  
&nbsp; File "/share/MD0\_DATA/.qpkg/PlexMediaServer/Resources/Python/lib/python2.7/gzip.py", line 253, in read  
&nbsp;&nbsp;&nbsp; while self.\_read(readsize):  
&nbsp; File "/share/MD0\_DATA/.qpkg/PlexMediaServer/Resources/Python/lib/python2.7/gzip.py", line 293, in \_read  
&nbsp;&nbsp;&nbsp; self.\_read\_gzip\_header()  
&nbsp; File "/share/MD0\_DATA/.qpkg/PlexMediaServer/Resources/Python/lib/python2.7/gzip.py", line 197, in \_read\_gzip\_header  
&nbsp;&nbsp;&nbsp; raise IOError, 'Not a gzipped file'  
IOError: Not a gzipped file  
  
2014-04-05 22:29:30,756 (-b239470) :&nbsp; DEBUG (model:218) - Serializing to /root/Library/Plex Media Server/Metadata/Movies/1/1e01d6db905fc7681be93bea91b75fd7e94e729.bundle/Contents/com.plexapp.agents.opensubtitles/Info.xml  
2014-04-05 22:29:30,761 (-b239470) :&nbsp; DEBUG (runtime:918) - Response: [200] str, 16 bytes  
&nbsp;

---

<div class="post-metadata">

### Author: ![oncleben31](https://avatars.discourse-cdn.com/v4/letter/o/838e76/32.png) [@oncleben31](https://forums.plex.tv/u/oncleben31)
#### Post date: [April 6, 2014, 10:56pm UTC](https://forums.plex.tv/t/beta-for-opensubtitles-metadata-agent-improvement/60938/14 "2014-04-06T22:56:27Z")

</div>

@Sebhash I'm not sure you have my code. Can you make a verification of the installation. And ressent your logs.

@mhugo I pretty sure this is due to OpenSubtitles.org which have some difficulties with their servers unavailable from time to time. I will add a catch in this part of the code to understand the reason of errors during this phase.

---

<div class="post-metadata">

### Author: ![alexarnoud](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@alexarnoud](https://forums.plex.tv/u/alexarnoud)
#### Post date: [April 12, 2014, 10:48am UTC](https://forums.plex.tv/t/beta-for-opensubtitles-metadata-agent-improvement/60938/15 "2014-04-12T10:48:54Z")

</div>

Hi,

I've been giving a try to your agent and it seems to work better than the original indeed !

Here's a CRITICAL I have encountered so far on different TV Shows :

```
2014-04-12 12:09:35,978 (7f6b016ee700) : &nbsp;CRITICAL (agentkit:974) - Exception in the update function of agent named ‘[OpenSubtitles.org](http://OpenSubtitles.org)’, called with guid ‘com.plexapp.agents.thetvdb://79334?lang=en’ (most recent call last):  
&nbsp; File “/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py”, line 972, in \_update  
&nbsp; &nbsp; agent.update(obj, media, lang)  
&nbsp; File “/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/OpenSubtitles.bundle/Contents/Code/ **init**.py”, line 412, in update  
&nbsp; &nbsp; subtitleResponse = fetchSubtitles(proxy, token, part, language, primaryAgentLanguage, ImdbEpisodeId, OS\_Search\_Methode.IMDB)  
&nbsp; File “/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/OpenSubtitles.bundle/Contents/Code/ **init**.py”, line 183, in fetchSubtitles  
&nbsp; &nbsp; Log(‘Looking for match for name and language %s’ % ( language))  
&nbsp; File “/usr/lib/plexmediaserver/Resources/Python/lib/python2.7/xmlrpclib.py”, line 1224, in **call**  
&nbsp; &nbsp; return self.\_\_send(self.\_\_name, args)  
&nbsp; File “/usr/lib/plexmediaserver/Resources/Python/lib/python2.7/xmlrpclib.py”, line 1572, in \_\_request  
&nbsp; &nbsp; allow\_none=self.\_\_allow\_none)  
&nbsp; File “/usr/lib/plexmediaserver/Resources/Python/lib/python2.7/xmlrpclib.py”, line 1085, in dumps  
&nbsp; &nbsp; data = m.dumps(params)  
&nbsp; File “/usr/lib/plexmediaserver/Resources/Python/lib/python2.7/xmlrpclib.py”, line 632, in dumps  
&nbsp; &nbsp; dump(v, write)  
&nbsp; File “/usr/lib/plexmediaserver/Resources/Python/lib/python2.7/xmlrpclib.py”, line 654, in \_\_dump  
&nbsp; &nbsp; f(self, value, write)  
&nbsp; File “/usr/lib/plexmediaserver/Resources/Python/lib/python2.7/xmlrpclib.py”, line 714, in dump\_array  
&nbsp; &nbsp; dump(v, write)  
&nbsp; File “/usr/lib/plexmediaserver/Resources/Python/lib/python2.7/xmlrpclib.py”, line 654, in \_\_dump  
&nbsp; &nbsp; f(self, value, write)  
&nbsp; File “/usr/lib/plexmediaserver/Resources/Python/lib/python2.7/xmlrpclib.py”, line 735, in dump\_struct  
&nbsp; &nbsp; dump(v, write)  
&nbsp; File “/usr/lib/plexmediaserver/Resources/Python/lib/python2.7/xmlrpclib.py”, line 654, in \_\_dump  
&nbsp; &nbsp; f(self, value, write)  
&nbsp; File “/usr/lib/plexmediaserver/Resources/Python/lib/python2.7/xmlrpclib.py”, line 658, in dump\_nil  
&nbsp; &nbsp; raise TypeError, “cannot marshal None unless allow\_none is enabled”  
TypeError: cannot marshal None unless allow\_none is enabled
```

Keep up the good work !

Alex

---

<div class="post-metadata">

### Author: ![oncleben31](https://avatars.discourse-cdn.com/v4/letter/o/838e76/32.png) [@oncleben31](https://forums.plex.tv/u/oncleben31)
#### Post date: [April 15, 2014, 6:27am UTC](https://forums.plex.tv/t/beta-for-opensubtitles-metadata-agent-improvement/60938/16 "2014-04-15T06:27:56Z")

</div>

Thanks for your report. Can you add the logs before that message to help me understand the context of the error ?&nbsp;

---

<div class="post-metadata">

### Author: ![alexarnoud](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@alexarnoud](https://forums.plex.tv/u/alexarnoud)
#### Post date: [April 20, 2014, 7:25pm UTC](https://forums.plex.tv/t/beta-for-opensubtitles-metadata-agent-improvement/60938/17 "2014-04-20T19:25:09Z")

</div>

Hi, made a reply in direct message with log attached, hope you find something useful :)

Alex

---

<div class="post-metadata">

### Author: ![oncleben31](https://avatars.discourse-cdn.com/v4/letter/o/838e76/32.png) [@oncleben31](https://forums.plex.tv/u/oncleben31)
#### Post date: [April 23, 2014, 9:13pm UTC](https://forums.plex.tv/t/beta-for-opensubtitles-metadata-agent-improvement/60938/18 "2014-04-23T21:13:03Z")

</div>

Thanks I will look your logs.

---

<div class="post-metadata">

### Author: ![hojel](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/hojel/32/7318_2.png) [@hojel](https://forums.plex.tv/u/hojel)
#### Post date: [May 5, 2014, 7:22am UTC](https://forums.plex.tv/t/beta-for-opensubtitles-metadata-agent-improvement/60938/19 "2014-05-05T07:22:33Z")

</div>

Hello,

I built Korean metadata agent(com.plex.agent.daum\_movie) and someone asked me how to download subtitles with OpenSubtitles.

It seems the first priority option is using file hash key which Plex framework tosses to the agent in special care, and searching with IMDB ID is the 2nd priority.

But the current OpenSubtitles is hard coded to run with IMDB & TVDB agent, even though no info from TVDB is used in the original OpenSubtitles agent.

I think you should remove this dependency for further compatibility.

Also there is a chance that new agent passes IMDB ID to let OpenSubtitles agent.work with. I added this option in my agent for test.

---

<div class="post-metadata">

### Author: ![portokala123](https://avatars.discourse-cdn.com/v4/letter/p/ac91a4/32.png) [@portokala123](https://forums.plex.tv/u/portokala123)
#### Post date: [May 20, 2014, 8:21am UTC](https://forums.plex.tv/t/beta-for-opensubtitles-metadata-agent-improvement/60938/20 "2014-05-20T08:21:55Z")

</div>

Some suggestions:

1. Don't fetch .sub subtitles, thay are generaly bad. In my&nbsp; case every .sub substiles are out of sync or wrong episode.

2. Use HASH search, Im long time XBMC user and HASH search are almost 100% hit.

In my case all bulgarian subtitles for "24" fisrt two seasons episodes are wrong, it will be better if i pick them randomly :)

[Next page](https://forums.plex.tv/t/beta-for-opensubtitles-metadata-agent-improvement/60938.md?page=2)
