allenai / allenai/kb

json.decoder.JSONDecodeError

Open
#34 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
372
Forks
50
PR merge metrics
No merged PRs in 30d

Description

Hi, trying to use your code and receiving the following error:

/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/site-packages/sklearn/utils/linear_assignment_.py:22: FutureWarning: The linear_assignment_ module is deprecated in 0.21 and will be removed from 0.23. Use scipy.optimize.linear_sum_assignment instead.
FutureWarning)
/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/data/token_indexers/token_characters_indexer.py:51: UserWarning: You are using the default value (0) of `min_padding_length`, which can cause some subtle bugs (more info see https://github.com/allenai/allennlp/issues/1954). Strongly recommend to set a value, usually the maximum size of the convolutional layer size when using CnnEncoder.
UserWarning)
Traceback (most recent call last):
File "KnowBERT_run.py", line 13, in
batcher = KnowBertBatchifier(archive_file)
File "/home/cheshani/kb-master/kb/knowbert_utils.py", line 61, in __init__
from_params(Params(candidate_generator_params))
File "/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/common/from_params.py", line 289, in from_params
return subclass.from_params(params=params, **extras)
File "/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/common/from_params.py", line 300, in from_params
kwargs = create_kwargs(cls, params, **extras)
File "/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/common/from_params.py", line 194, in create_kwargs
value_dict[key] = value_cls.from_params(params=value_params, **extras)
File "/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/common/from_params.py", line 289, in from_params
return subclass.from_params(params=params, **extras)
File "/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/site-packages/allennlp/common/from_params.py", line 302, in from_params
return cls(**kwargs) # type: ignore
File "/home/cheshani/kb-master/kb/wiki_linking_util.py", line 153, in __init__
self.entity_world = json.load(open(entity_world_path))
File "/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/json/__init__.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/json/__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/home/cheshani/anaconda3/envs/knowbert/lib/python3.6/json/decoder.py", line 355, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Unterminated string starting at: line 13438 column 5 (char 522455)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.