fastPunct icon indicating copy to clipboard operation
fastPunct copied to clipboard

Issue while initializing the module

Open Soldelli opened this issue 2 years ago • 0 comments

>>> from fastpunct import FastPunct

>>> fastpunct = FastPunct()

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/soldanm/anaconda3/envs/test/lib/python3.7/site-packages/fastpunct/fastpunct.py", line 46, in __init__
    self.tokenizer = T5Tokenizer.from_pretrained(lang_path)
  File "/home/soldanm/anaconda3/envs/test/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 1749, in from_pretrained
    **kwargs,
  File "/home/soldanm/anaconda3/envs/test/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 1782, in _from_pretrained
    init_kwargs = json.load(tokenizer_config_handle)
  File "/home/soldanm/anaconda3/envs/test/lib/python3.7/json/__init__.py", line 296, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/home/soldanm/anaconda3/envs/test/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/home/soldanm/anaconda3/envs/test/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/home/soldanm/anaconda3/envs/test/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)
>>> fastpunct = FastPunct()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/soldanm/anaconda3/envs/test/lib/python3.7/site-packages/fastpunct/fastpunct.py", line 46, in __init__
    self.tokenizer = T5Tokenizer.from_pretrained(lang_path)
  File "/home/soldanm/anaconda3/envs/test/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 1749, in from_pretrained
    **kwargs,
  File "/home/soldanm/anaconda3/envs/test/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 1782, in _from_pretrained
    init_kwargs = json.load(tokenizer_config_handle)
  File "/home/soldanm/anaconda3/envs/test/lib/python3.7/json/__init__.py", line 296, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/home/soldanm/anaconda3/envs/test/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/home/soldanm/anaconda3/envs/test/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/home/soldanm/anaconda3/envs/test/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)

Please provide me with some intuition on how to overcome this issue.

Soldelli avatar Oct 10 '21 10:10 Soldelli