---------------------------------------------------------------------------
JSONDecodeError Traceback (most recent call last)
File ~/anaconda3/envs/py39/lib/python3.9/site-packages/requests/models.py:972, in Response.json(self, **kwargs)
971 try:
--> 972 return complexjson.loads(self.text, **kwargs)
973 except JSONDecodeError as e:
974 # Catch JSON-related errors and raise as requests.JSONDecodeError
975 # This aliases json.JSONDecodeError and simplejson.JSONDecodeError
File ~/anaconda3/envs/py39/lib/python3.9/json/__init__.py:346, in loads(s, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
343 if (cls is None and object_hook is None and
344 parse_int is None and parse_float is None and
345 parse_constant is None and object_pairs_hook is None and not kw):
--> 346 return _default_decoder.decode(s)
347 if cls is None:
File ~/anaconda3/envs/py39/lib/python3.9/json/decoder.py:337, in JSONDecoder.decode(self, s, _w)
333 """Return the Python representation of ``s`` (a ``str`` instance
334 containing a JSON document).
335
336 """
--> 337 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
338 end = _w(s, end).end()
File ~/anaconda3/envs/py39/lib/python3.9/json/decoder.py:355, in JSONDecoder.raw_decode(self, s, idx)
354 except StopIteration as err:
--> 355 raise JSONDecodeError("Expecting value", s, err.value) from None
356 return obj, end
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
JSONDecodeError Traceback (most recent call last)
Input In [7], in <cell line: 1>()
----> 1 API = CVAT( username="gytarasov", password="Tar-2022@", url="http://cvat.rcud-rt.ru/")
File ~/anaconda3/envs/py39/lib/python3.9/site-packages/CVAT/__init__.py:37, in CVAT.__init__(self, username, password, url)
31 body: dict = {
32 "username": username,
33 "password": password
34 }
35 response: Response = self.session.post(url=f'{self.url}/api/auth/login',
36 json=body)
---> 37 self.session.headers = {"Authorization": f'Token {response.json()["key"]}'}
38 if response.status_code != 200:
39 raise ValueError("Bad credentials")
File ~/anaconda3/envs/py39/lib/python3.9/site-packages/requests/models.py:976, in Response.json(self, **kwargs)
972 return complexjson.loads(self.text, **kwargs)
973 except JSONDecodeError as e:
974 # Catch JSON-related errors and raise as requests.JSONDecodeError
975 # This aliases json.JSONDecodeError and simplejson.JSONDecodeError
--> 976 raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
JSONDecodeError: Expecting value: line 1 column 1 (char 0)