Skip to content

vcf_filter.py python3 error with --output #327

@ghost

Description

When I try to use the --output arg to vcf_filter.py I get this traceback:

Traceback (most recent call last):
  File "/home/coyote/anaconda3/bin/vcf_filter.py", line 168, in <module>
    if __name__ == '__main__': main()
  File "/home/coyote/anaconda3/bin/vcf_filter.py", line 142, in main
    output = vcf.Writer(args.output, inp)
  File "/home/coyote/anaconda3/lib/python3.7/site-packages/vcf/parser.py", line 644, in __init__
    quotechar='', quoting=csv.QUOTE_NONE)
TypeError: argument 1 must have a "write" method

Do you mean to have this on line 142 of vcf_filter.py:
output = vcf.Writer(open(args.output, 'w'), inp)

instead of this: output = vcf.Writer(args.output, inp)

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