Skip to content
This repository has been archived by the owner on Jul 6, 2021. It is now read-only.

ERROR:periscopio.plugins.SubtitleDatabase:Error occured #1

Open
nerijus opened this issue Dec 14, 2017 · 4 comments
Open

ERROR:periscopio.plugins.SubtitleDatabase:Error occured #1

nerijus opened this issue Dec 14, 2017 · 4 comments

Comments

@nerijus
Copy link

nerijus commented Dec 14, 2017

When running from the command line:

INFO:periscopio.periscopio:Searching on SubDivX 
INFO:periscopio.plugins.SubtitleDatabase:SubDivX writing 0 items to queue
ERROR:periscopio.plugins.SubtitleDatabase:Error occured
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/periscopio/plugins/SubtitleDatabase.py", line 45, in searchInThread
    subs = self.process(filename, langs)
  File "/usr/lib/python2.7/site-packages/periscopio/plugins/OpenSubtitles.py", line 97, in process
    return self.query(moviehash=filehash, langs=langs, bytesize=size, filename=fname)
  File "/usr/lib/python2.7/site-packages/periscopio/plugins/OpenSubtitles.py", line 153, in query
    sublinks += self.get_results(token, search)
  File "/usr/lib/python2.7/site-packages/periscopio/plugins/OpenSubtitles.py", line 176, in get_results
    if results['data']:
KeyError: 'data'
INFO:periscopio.plugins.SubtitleDatabase:TheSubDB writing 0 items to queue
INFO:periscopio.plugins.SubtitleDatabase:Podnapisi writing 0 items to queue
INFO:periscopio.periscopio:lang-in-name read from config: False
INFO:__main__:**************************************************
INFO:__main__:Downloaded 0 subtitles
INFO:__main__:**************************************************
@darkshram
Copy link
Owner

OpenSubtitles plugin is broken. Working on it during the weekend.

I'm currently cleaning the code from upstream (periscope-gnome). Code was little messy: lots trailing spaces everywhere, too long lines, unused modules, undefined variable, etc. For the time being, I suggest to edit ~/.config/periscopio/config and enable only the other plugins. This is, put all the ones that are useful for you and exclude OpenSubtitles.

SubtitleDatabase is a parser for the rest of the plugins.

The ones tha work Ok are:

  • Addic7ed (only TV shows, probably the best)
  • LegendasTV (portuguese subtitles only)
  • Podnapisi2
  • Podnapisi
  • SubDivX (only spanish subtitles)
  • SubScene
  • SubsWiki
  • SubtitleSource
  • TheSubDB
  • TvSubtitles

@nerijus
Copy link
Author

nerijus commented Dec 16, 2017

Could you please add to the default config file all the plugins, so that people could disable unneeded ones easily, just by commenting them out or removing them from the list?

Or to make something like that work - use minus to disable plugin, for example:
plugins = -LegendasTV -SubDivX

@nerijus
Copy link
Author

nerijus commented Mar 5, 2018

OpenSubtitles plugin is still broken.

@nerijus
Copy link
Author

nerijus commented Mar 5, 2018

If I add plugins = -OpenSubtitles to config, I get

Traceback (most recent call last):
  File "/usr/bin/periscopio", line 136, in <module>
    main()
  File "/usr/bin/periscopio", line 100, in main
    sub = periscopio_client.downloadSubtitle(arg, langs)
  File "/usr/lib/python2.7/site-packages/periscopio/periscopio.py", line 210, in downloadSubtitle
    subtitles = self.listSubtitles(filename, langs)
  File "/usr/lib/python2.7/site-packages/periscopio/periscopio.py", line 154, in listSubtitles
    plugin = getattr(plugins, name)(self.config, self.cache_path)
AttributeError: 'module' object has no attribute '-OpenSubtitles'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants