Skip to content

Windows Compatibility Filepath #3

@supatuffpinkpuff

Description

@supatuffpinkpuff

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions