DeepL-Console-Translator icon indicating copy to clipboard operation
DeepL-Console-Translator copied to clipboard

KeyError: 'result'

Open sputnick-dev opened this issue 7 years ago • 1 comments

$ pip2 list | grep -E 'wheel|requests|pip'
pip                      10.0.0          
requests                 2.18.4          
wheel                    0.31.0
$ python3 translate.py -s FR "what's the fuck?"
Traceback (most recent call last):
  File "translate.py", line 62, in <module>
    main()
  File "translate.py", line 49, in main
    translations = req.json()['result']['translations']
KeyError: 'result'

With archlinux x86_64

sputnick-dev avatar Apr 16 '18 21:04 sputnick-dev

Workaround https://github.com/uinput/deeplator

5t4rdu5t avatar Apr 23 '18 08:04 5t4rdu5t