elimuinformatics/vcf2fhir

Installation succeeds; "import vcf2fhir" fails

bwalsh opened this issue · 2 comments

Prerequisites

Please answer the following questions for yourself before submitting an issue.

  • [ x] I am running the latest version
  • [ x] I checked the documentation and found no answer
  • [ x] I checked to make sure that this issue has not already been filed

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

Python 3.9.12 (main, Mar 26 2022, 15:51:13)
[Clang 12.0.0 (clang-1200.0.32.29)] on darwin

Expected Behavior

import should work

Current Behavior

$ python3
Python 3.9.12 (main, Mar 26 2022, 15:51:13)
[Clang 12.0.0 (clang-1200.0.32.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

import vcf2fhir
Traceback (most recent call last):
File "", line 1, in
File "/Users/walsbr/coherent-dataset/venv/lib/python3.9/site-packages/vcf2fhir/init.py", line 1, in
from vcf2fhir.converter import Converter
File "/Users/walsbr/coherent-dataset/venv/lib/python3.9/site-packages/vcf2fhir/converter.py", line 1, in
import vcf
File "/Users/walsbr/coherent-dataset/venv/lib/python3.9/site-packages/vcf/init.py", line 9, in
from vcf.parser import Reader, Writer
File "/Users/walsbr/coherent-dataset/venv/lib/python3.9/site-packages/vcf/parser.py", line 25, in
from model import _Call, _Record, make_calldata_tuple
ModuleNotFoundError: No module named 'model'

Failure Information (for bugs)

Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.

Steps to Reproduce

python3 -m venv venv
source venv/bin/activate
pip3 install setuptools==58
pip3 install cython wheel
pip3 install vcf2fhir
python3 -c "import vcf2fhir"

Failure Logs

See above

Hi @bwalsh, thanks for reporting this. Based on the error message, it looks like it's due to the pyvcf library. Pyvcf is no longer maintained by anyone. We'll most probably replace it with PyVCF3.

Thanks. The following worked.

python3 -m venv venv
source venv/bin/activate
pip3 install vcf2fhir
python3 -c "import vcf2fhir"

Please go ahead and close the issue.