vcfstats icon indicating copy to clipboard operation
vcfstats copied to clipboard

AttributeError: module 'py' has no attribute 'io'

Open Jokendo-collab opened this issue 1 year ago • 1 comments

I am getting the following error when running vcfstats and I do not know how I can go about this error. Can someone help with this:

 vcfstats --vcf output_filtered.vcf --outdir examples/ --formula 'AAF ~ CONTIG' --title 'Allele frequency on each chromosome (boxplot)' --config examples/config.toml  --figtype boxplot
[05/22/23 12:24:43] INFO     Combining regions, be reminded that regions should NOT be overlapping ...                                                                    
[05/22/23 12:24:43] INFO     Getting vcf handler by given regions ...                                                                                                     
Traceback (most recent call last):
  File "/home/okendojo/.local/bin/vcfstats", line 8, in <module>
    sys.exit(main())
  File "/home/okendojo/.local/lib/python3.8/site-packages/vcfstats/cli.py", line 181, in main
    vcf, samples = get_vcf_by_regions(
  File "/home/okendojo/.local/lib/python3.8/site-packages/vcfstats/cli.py", line 39, in get_vcf_by_regions
    with capture_c_msg("cyvcf2"):
  File "/usr/local/Anaconda/envs/py3.8/lib/python3.8/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/home/okendojo/.local/lib/python3.8/site-packages/vcfstats/utils.py", line 65, in capture_c_msg
    capture = py.io.StdCaptureFD(out=False, in_=False)
AttributeError: module 'py' has no attribute 'io'

Jokendo-collab avatar May 22 '23 16:05 Jokendo-collab

Will this solve the issue:

$ pip install -U py

https://github.com/pytest-dev/pytest/issues/10420#issuecomment-1290697849

pwwang avatar May 22 '23 16:05 pwwang