Skip to content
This repository was archived by the owner on Nov 16, 2021. It is now read-only.

Issue while initializing the module #29

@Soldelli

Description

@Soldelli
>>> 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions