stanfordmlgroup / chexpert-labeler

CheXpert NLP tool to extract observations from radiology reports.
MIT License
328 stars 78 forks source link

ValueError: Parser model has not been loaded. #24

Closed binerone closed 3 years ago

binerone commented 3 years ago

when i run with the command : python label.py --reports_path {reports_path} here is the error:

Traceback (most recent call last): File "label.py", line 51, in <module> label(parser.parse_args()) File "label.py", line 42, in label classifier.classify(loader.collection) File "/Users/binerone/test/chexpert-labeler/stages/classify.py", line 100, in classify self.parser.parse_doc(document) File "/Users/binerone/test/NegBio/negbio/pipeline/parse.py", line 55, in parse_doc tree = self.parse(text) File "/Users/binerone/test/NegBio/negbio/pipeline/parse.py", line 34, in parse nbest = self.rrp.parse(str(s)) File "/Users/binerone/anaconda3/envs/chexpert-label/lib/python3.6/site-packages/bllipparser/RerankingParser.py", line 614, in parse rerank = self.check_models_loaded_or_error(rerank) File "/Users/binerone/anaconda3/envs/chexpert-label/lib/python3.6/site-packages/bllipparser/RerankingParser.py", line 786, in check_models_loaded_or_error raise ValueError("Parser model has not been loaded.") ValueError: Parser model has not been loaded.

My os is Mac os, I can not solve this problem. Thanks for help.

jirvin16 commented 3 years ago

Did you follow all 6 steps outlined in the README?

binerone commented 3 years ago

I have tried to execute the 6 steps in the readme, but when the execution reaches the third step, there is a problem:

`Collecting package metadata (repodata.json): done Solving environment: failed

ResolvePackageNotFound:

So, I manually created the virtual environment and manually installed the library in the "environment.yml".

Then, after performing steps 4-6 normally, an error occurred when running the label.py file.