Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) #11

Closed
alwayslikethat opened this issue Nov 8, 2021 · 3 comments

Comments

@alwayslikethat
Copy link

Traceback (most recent call last):
File "D:/pythonProject/HMEAE-master/train.py", line 28, in
tf.app.run()
File "D:\anaconda2020\lib\site-packages\tensorflow\python\platform\app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "D:\anaconda2020\lib\site-packages\absl\app.py", line 303, in run
_run_main(main, args)
File "D:\anaconda2020\lib\site-packages\absl\app.py", line 251, in _run_main
sys.exit(main(argv))
File "D:/pythonProject/HMEAE-master/train.py", line 17, in main
extractor.Extract()
File "D:\pythonProject\HMEAE-master\utils.py", line 388, in Extract
self.Event_Extract()
File "D:\pythonProject\HMEAE-master\utils.py", line 183, in Event_Extract
tokens,offsets = nlp.word_tokenize(sent,True)
File "D:\anaconda2020\lib\site-packages\stanfordcorenlp\corenlp.py", line 173, in word_tokenize
r_dict = self._request('ssplit,tokenize', sentence)
File "D:\anaconda2020\lib\site-packages\stanfordcorenlp\corenlp.py", line 239, in request
r_dict = json.loads(r.text)
File "D:\anaconda2020\lib\json_init
.py", line 357, in loads
return _default_decoder.decode(s)
File "D:\anaconda2020\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "D:\anaconda2020\lib\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)

@alwayslikethat
Copy link
Author

怎么搞啊,谢谢回复

@wzq016
Copy link
Collaborator

wzq016 commented Nov 8, 2021

这应该是stanfordcorenlp包的问题。希望您能提供更多细节,比如下载的模型是什么时候发布的,程序是一开始就遇到了这个问题还是处理到一半才报错。

另外我们只在2018-10-05发布的版本测试过,因此如果您的版本不是这个可以下载这个版本和对应的english model再试试。

@huyankun2020022098
Copy link

FileNotFoundError: [WinError 2] 系统找不到指定的文件。

@Bakser Bakser closed this as completed Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants