---------------------------------------------------------------------------
JSONDecodeError Traceback (most recent call last)
File ~/.local/lib/python3.10/site-packages/requests/models.py:971, in Response.json(self, **kwargs)
970 try:
--> 971 return complexjson.loads(self.text, **kwargs)
972 except JSONDecodeError as e:
973 # Catch JSON-related errors and raise as requests.JSONDecodeError
974 # This aliases json.JSONDecodeError and simplejson.JSONDecodeError
File /usr/lib/python3.10/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 /usr/lib/python3.10/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 /usr/lib/python3.10/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)
Cell In[3], line 1
----> 1 c.get_freqs().display_names()
File ~/prosjekter/DHLAB/dhlab/future/corpus_conc_coll.py:71, in Corpus.get_freqs(self)
70 def get_freqs(self):
---> 71 return Frequencies.get_freqs(self)
File ~/prosjekter/DHLAB/dhlab/future/corpus_conc_coll.py:108, in Frequencies.get_freqs(self, corpus, words)
106 @classmethod
107 def get_freqs(self, corpus, words=None):
--> 108 res = get_document_frequencies(urns=urnlist(corpus), words=words)
109 self._title_dct = {k: v for k, v in zip(corpus.dhlabid, corpus.title)}
110 return Frequencies(res)
File ~/prosjekter/DHLAB/dhlab/api/dhlab_api.py:559, in get_document_frequencies(urns, cutoff, words, sparse)
557 params = locals()
558 r = requests.post(f"{BASE_URL}/frequencies", json=params)
--> 559 result = r.json()
560 # check if words are passed - return differs a bit
561 if words is None:
File ~/.local/lib/python3.10/site-packages/requests/models.py:975, in Response.json(self, **kwargs)
971 return complexjson.loads(self.text, **kwargs)
972 except JSONDecodeError as e:
973 # Catch JSON-related errors and raise as requests.JSONDecodeError
974 # This aliases json.JSONDecodeError and simplejson.JSONDecodeError
--> 975 raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
JSONDecodeError: Expecting value: line 1 column 1 (char 0)