alexanderwink / subdl

subdl - command-line tool to download subtitles from opensubtitles.org Official support for subdl seems to have been dropped. This site is intended for the future use of subdl with community driven support.
87 stars 18 forks source link

subdl --list-languages no longer works #40

Closed PacoH closed 1 year ago

PacoH commented 1 year ago
subdl --version
subdl 1.1.2
subdl --list-languages
Traceback (most recent call last):
  File "/usr/local/bin/subdl", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/usr/local/lib/python3.11/site-packages/subdl.py", line 534, in cli
    main(sys.argv[1:])
  File "/usr/local/lib/python3.11/site-packages/subdl.py", line 459, in main
    files = parseargs(args)
            ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/subdl.py", line 444, in parseargs
    ListLanguages()
  File "/usr/local/lib/python3.11/site-packages/subdl.py", line 358, in ListLanguages
    languages = xmlrpc_server.GetSubLanguages('')['data']
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'GetSubLanguages'
b1337xyz commented 1 year ago

Easy fix, put osdb_connect() before files = parseargs(args)

 def main(args):
-    files = parseargs(args)
     osdb_connect()
+    files = parseargs(args)
alexanderwink commented 1 year ago

This was unintentionally resolved in https://github.com/alexanderwink/subdl/pull/35