get_translations is not working
See original GitHub issueWhen I am passing a list with source and target it shows:
Traceback (most recent call last):
File "/home/shafquat/DuolingoWordList/venv/lib/python3.7/site-packages/duolingo.py", line 230, in get_translations
return request.json()
File "/home/shafquat/DuolingoWordList/venv/lib/python3.7/site-packages/requests/models.py", line 897, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.7/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "get_vocab.py", line 15, in <module>
meaning = lingo.get_translations(wordstrings, source='ar', target='en')
File "/home/shafquat/DuolingoWordList/venv/lib/python3.7/site-packages/duolingo.py", line 232, in get_translations
raise Exception('Could not get translations')
Exception: Could not get translations
Issue Analytics
- State:
- Created 4 years ago
- Comments:8
Top Results From Across the Web
ngx-translate's getTranslation function doesn't listen to ...
The problem is, that getTranslation doesn't seem to update the Observable on translations.next() and continues using the translations that ...
Read more >this.currentLoader.getTranslation is not a function #186 - GitHub
I'm trying to familiarize myself with this package. I loaded ng2-translate with the code available in the documentation with some changes ...
Read more >ngx-translate Documentation - CodeAndWeb
This invokes the current loader to retrieve the translations if the language is not yet loaded. Calling use uses the loader to retrieve...
Read more >How to translate your Angular app with ngx-translate
1. Add ngx-translate to your Angular application 2. Set up the TranslateService in your app.module.ts 3. Create your main language translation file (in...
Read more >getTranslation() should throw an exception when an ... - Drupal
Problem/Motivation ContentEntityInterface::getTranslation() returns a new translation if the specified language is valid but there's no ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It’s still working on my branch [which is in PR]: https://travis-ci.org/joshcoales/Duolingo/builds/639460517 Have you provided both a username and password to the Duolingo constructor? It no longer works with just username
EDIT: oh, just seen your message in another thread, which implies you will have given password. That’s odd then.
Fixed in 0.5.3