KartikTalwar/Duolingo

Can't create Duolingo object, again

matthias-t opened this issue · 2 comments

======================================================================
ERROR: tests (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: tests
Traceback (most recent call last):
  File "/lib/python3.5/unittest/loader.py", line 428, in _find_test_path
    module = self._get_module_from_name(name)
  File "/lib/python3.5/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "tests.py", line 9, in <module>
    class DuolingoTest(unittest.TestCase):
  File "tests.py", line 10, in DuolingoTest
    lingo = duolingo.Duolingo(USERNAME, password=PASSWORD)
  File "duolingo.py", line 36, in __init__
    self.user_data = Struct(**self._get_data())
  File "duolingo.py", line 177, in _get_data
    get = self._make_req(self.user_url).json()
  File "/lib/python3.5/site-packages/requests/models.py", line 897, in json
    return complexjson.loads(self.text, **kwargs)
  File "/lib/python3.5/json/__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "/lib/python3.5/json/decoder.py", line 342, in decode
    raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 5 (char 4)

Using 0848a07, the latest commit on master as of writing this.

It seems that using the duolingo API without password is no longer possible at all, are you supplying a password?

I wasn't. thanks