TypeError: Expected bytes, got int

121 views
Skip to first unread message

pykey

unread,
Aug 14, 2018, 5:31:27 AM8/14/18
to Pysam User group
Dear all,

I just post my error stack here:

for r in st.fetch(chro, start, end):
 
File "pysam/calignmentfile.pyx", line 897, in pysam.calignmentfile.AlignmentFile.fetch (pysam/calignmentfile.c:11463)
 
File "pysam/calignmentfile.pyx", line 816, in pysam.calignmentfile.AlignmentFile.parse_region (pysam/calignmentfile.c:10830)
 
File "pysam/calignmentfile.pyx", line 1650, in pysam.calignmentfile.AlignmentFile.gettid (pysam/calignmentfile.c:18701)
 
File "pysam/calignmentfile.pyx", line 669, in pysam.calignmentfile.AlignmentFile.get_tid (pysam/calignmentfile.c:9274)
 
File "pysam/cutils.pyx", line 114, in pysam.cutils.force_bytes (pysam/cutils.c:2661)
TypeError: Expected bytes, got int

chro, start, and end are all integers.

Any idea?
Thanks,

Florian Finkernagel

unread,
Aug 14, 2018, 7:20:58 AM8/14/18
to Pysam User group
Dear pykey,

'chro' must be a byte-string - it's a reference name.

So long,
Florian
Reply all
Reply to author
Forward
0 new messages