Diaoul/subliminal

[tvsubtitles] CacheRegion Error

Closed this issue · 11 comments

cache region is configured in this way:

subliminal.cache_region.configure('dogpile.cache.dbm', arguments={'filename': './cache/subliminal.dbm'})

Other provider without need of caching id are working.

2013-12-10 21:40:27 ERROR SUBLIMINAL :: Unexpected error in provider u'tvsubtitles'
AAAttributeError: 'CacheRegion' object has no attribute '_lock_registry'
AA return self._lock_registry.get(key)
AA File "C:\Temp\Sickbeard Pistachitos\Sick-Beard\lib\dogpile\cache\region.py", line 275, in mutex
AA self.mutex(key),
AA File "C:\Temp\Sickbeard Pistachitos\Sick-Beard\lib\dogpile\cache\region.py", line 632, in get_or_create
AA should_cache_fn)
AA File "C:\Temp\Sickbeard Pistachitos\Sick-Beard\lib\dogpile\cache\region.py", line 998, in decorate
AA show_ids = self.get_show_ids()
AA File "C:\Temp\Sickbeard Pistachitos\Sick-Beard\lib\subliminal\providers\addic7ed.py", line 162, in query
AA return [s for s in self.query(video.series, video.season, video.year)
AA File "C:\Temp\Sickbeard Pistachitos\Sick-Beard\lib\subliminal\providers\addic7ed.py", line 195, in list_subtitles
AA provider_subtitles = provider.list_subtitles(video, provider_languages)
AA File "C:\Temp\Sickbeard Pistachitos\Sick-Beard\lib\subliminal\providers__init
.py", line 224, in list_subtitles
AATraceback (most recent call last):
2013-12-10 21:38:14 ERROR SUBLIMINAL :: Unexpected error in provider u'addic7ed'

What version of dogpile.cache are you using?

Dogpile.cache version = '0.5.3'
Dogpile.core version = '0.4.1'

On Wed, Dec 11, 2013 at 3:27 PM, Antoine Bertin notifications@github.comwrote:

What version of dogpile.cache are you using?


Reply to this email directly or view it on GitHubhttps://github.com//issues/303#issuecomment-30324026
.

Have you tried a memory backend for testing purposes?

nope... Could you write me istruction for dogpile.cache in memory ?
Probably for sickbeard it's better handle the cache in memory...

On Wed, Dec 11, 2013 at 3:50 PM, Antoine Bertin notifications@github.comwrote:

Have you tried a memory backend for testing purposes?


Reply to this email directly or view it on GitHubhttps://github.com//issues/303#issuecomment-30325849
.

Indeed, that's a good idea for long running applications such as SickBeard: subliminal.cache_region.configure('dogpile.cache.memory')

Also have other problem.... this check "if not isinstance(video,
cls.video_types)" is always failing for me.... it's really strange because
the video have the type required..... this is on python 2.7 32 bit windows
7 64 bit.

On Wed, Dec 11, 2013 at 3:57 PM, Antoine Bertin notifications@github.comwrote:

Indeed, that's a good idea for long running applications such as
SickBeard: subliminal.cache_region.configure('dogpile.cache.memory')


Reply to this email directly or view it on GitHubhttps://github.com//issues/303#issuecomment-30326466
.

Anyway in the end these are proper check but are useless for sickbeard.. so
I will delete it.

On Wed, Dec 11, 2013 at 4:00 PM, Luca Di Marino l.dimarino@gmail.comwrote:

Also have other problem.... this check "if not isinstance(video,
cls.video_types)" is always failing for me.... it's really strange because
the video have the type required..... this is on python 2.7 32 bit windows
7 64 bit.

On Wed, Dec 11, 2013 at 3:57 PM, Antoine Bertin notifications@github.comwrote:

Indeed, that's a good idea for long running applications such as
SickBeard: subliminal.cache_region.configure('dogpile.cache.memory')


Reply to this email directly or view it on GitHubhttps://github.com//issues/303#issuecomment-30326466
.

Do you send the full path of your video? Because guessit needs the full path especially if the video is renamed.

Yes. In debug I can see video class

On Wed, Dec 11, 2013 at 4:35 PM, Antoine Bertin notifications@github.comwrote:

Do you send the full path of your video? Because guessit needs the full
path especially if the video is renamed.


Reply to this email directly or view it on GitHubhttps://github.com//issues/303#issuecomment-30330125
.

Continue to have problem with dogpile.cache_region caching in memory or file is the same.... have tried harder and found in debug this error:

File "C:\Temp\Sickbeard Pistachitos\Sick-Beard\lib\dogpile\cache\region.py", line 376, in backend
"No backend is configured on this region.")
RegionNotConfigured: No backend is configured on this region.

I'm using this code to search subs:

subliminal.cache_region.configure('dogpile.cache.memory')
need_languages = set(Language.fromalpha2(x) for x in sickbeard.SUBTITLES_LANGUAGES) - set(self.subtitles)
video = subliminal.scan_videos([self.location], subtitles=True, embedded_subtitles=True)
pm = subliminal.providers.ProviderManager(providers=sickbeard.subtitles.getEnabledServiceList())
subtitles = subliminal.api.download_best_subtitles(video,languages=need_languages,providers=sickbeard.subtitles.getEnabledServiceList())
subliminal.api.save_subtitles(subtitles)

Please really need an help on this

Resolved.