icd icon indicating copy to clipboard operation
icd copied to clipboard

Windows Compatibility Filepath

Open supatuffpinkpuff opened this issue 3 years ago • 0 comments

Thanks for making this package! I'm on Windows, and got thrown an error while trying to use it to calculate Elixhauser comorbidities.

Error message: [Errno 2] No such file or directory: 'C:\Users\kirby\Anaconda3\lib\site-packages\icd\comorbidity_mappings/quan_elixhauser10.json'

It looks to me the issue is that in line 31 of icd_to_comorbidities.py there's a hardcoded "/" in rel_path. I think it could be fixed by changing line 29 to

rel_path = os.path.join("comorbidity_mappings",mapping + ".json")

which should then use whatever OS-specific separator is appropriate.

supatuffpinkpuff avatar Mar 12 '21 22:03 supatuffpinkpuff