Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v1.1.2] All subtitle queries throwing error 'KeyError: 'data' #43

Open
Drag0nFly opened this issue Oct 15, 2024 · 2 comments
Open

[v1.1.2] All subtitle queries throwing error 'KeyError: 'data' #43

Drag0nFly opened this issue Oct 15, 2024 · 2 comments

Comments

@Drag0nFly
Copy link

It appears recent Python versions have caused subdl to break.

All subtitle queries are now throwing the following error:

Traceback (most recent call last):
  File "/usr/bin/subdl", line 537, in <module>
    cli()
  File "/usr/bin/subdl", line 534, in cli
    main(sys.argv[1:])
  File "/usr/bin/subdl", line 485, in main
    search_results = SearchSubtitlesByString(file_name, options.lang)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/subdl", line 227, in SearchSubtitlesByString
    data = results['data']
           ~~~~~~~^^^^^^^^
KeyError: 'data'

In addition to throwing (minor) warnings for escape sequences

/usr/bin/subdl:80: SyntaxWarning: invalid escape sequence '\.'
  'bitninja\.io',
/usr/bin/subdl:81: SyntaxWarning: invalid escape sequence '\.'
  'Please rate this subtitle at www\.osdb\.link',
/usr/bin/subdl:83: SyntaxWarning: invalid escape sequence '\.'
  'firebit\.org',
/usr/bin/subdl:84: SyntaxWarning: invalid escape sequence '\.'
  'humanguardians\.com',
/usr/bin/subdl:86: SyntaxWarning: invalid escape sequence '\.'
  'recast\.ai',
/usr/bin/subdl:207: SyntaxWarning: invalid escape sequence '\d'
  result = re.search("\d+", imdb_id)
subdl 1.1.2
@hejops
Copy link

hejops commented Nov 5, 2024

This (most likely) has nothing to do with Python. See #42.

@commonsourcecs
Copy link

commonsourcecs commented Dec 8, 2024

On the contrary, it would appear to be related to python changes.

See for example here:
HandBrake/HandBrake#5454

I propose making each of those 'real' strings, as seen with PR #44

But this only tackles the second minor escape sequences error.

It may be worth noting that earlier packaged versions, such as seen on Arch Linux, before
e01c13e
was applied, only require that and do not suffer the same major breakage resulting in " KeyError: 'data' "

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

No branches or pull requests

3 participants