facebookresearch / Clinical-Trial-Parser

Library for converting clinical trial eligibility criteria to a machine-readable format.
Apache License 2.0
163 stars 58 forks source link

cfg_parser.sh - cannot find resource path #19

Closed akocienia closed 3 years ago

akocienia commented 3 years ago

I tried to run cfg_parser on MacOS with zsh shell using Go version 1.15.11 but I encountered some permission-related issue.

When I run

.script/cfg_parser.sh

I got permission denied error:

I0422 21:43:31.925938   66244 variables.go:154] Number of variables loaded: 71
I0422 21:43:31.926333   66244 units.go:134] Number of units loaded: 46
I0422 21:43:31.926470   66244 main.go:128] Ingested studies: 20
F0422 21:43:31.926514   66244 file.go:20] open data/output/cfg_parsed_clinical_trials.tsv: permission denied
exit status 255
rm: data/output/cfg_parsed_clinical_trials.tsv: Permission denied

But when I try to run it with sudo

sudo .script/cfg_parser.sh

I got the following error which I'm not sure how to handle:

F0422 21:44:16.026445   66375 resource.go:37] Cannot find resource path for "/github.com/facebookresearch/Clinical-Trial-Parser/src/resources"
exit status 255
CFG parser failed.

Any ideas what could I do to make it work? Previously I used to run the parser on Linux, without any issues. I will really appreciate some help.

salkola commented 3 years ago

You may have lost the data/output directory. mkdir data/output should fix the problem.

akocienia commented 3 years ago

Thanks for suggestion. I double-checked and I'm sure that the output folder is there and contains example of results from both of the parsers. I tried to delete the repository and clone it again but the errors are still the same. I can also confirm that my GOPATH is set correctly. Do you have any other ideas what might be the reason of that error?

salkola commented 3 years ago

The CFG parse script run fine until it tried to write the results to cfg_parsed_clinical_trials.tsv. Is it possible that the file permissions do not allow the script to open the file?