HINGE icon indicating copy to clipboard operation
HINGE copied to clipboard

TypeError: must be str, not bytes in parse_read.py script

Open jsimba-99 opened this issue 3 years ago • 2 comments

Hi, running hinge to assemble the chloroplast genome (~156kb) of a plant species after install and set up all the dependencies and scripts I got the following error:

draft assembly Traceback (most recent call last): File "/HINGE//inst/bin/../lib/hinge/get_draft_path.py", line 77, in for read_id,read in zip(reads,reads_queried): File "/HINGE/inst/lib/hinge/parse_read.py", line 21, in parse_read seq += l.strip() TypeError: must be str, not bytes

Everything seemed it was working up to this point

I don't how to solve this error and would appreciate any help

Cheers,

jsimba-99 avatar Jun 09 '21 21:06 jsimba-99

It should work if you change to seq += l.decode('ascii').strip() or seq += l.decode('utf-8').strip().

fxia22 avatar Jun 10 '21 00:06 fxia22

Thanks, it worked apparently

My line now shows this error:

draft assembly Traceback (most recent call last): File "/HINGE//inst/bin/../lib/hinge/get_draft_path.py", line 109, in vert_len = len(read_dict[int(vert_id)][1]) KeyError: 844

Any idea about this?

Many thanks @fxia22

Cheers,

jsimba-99 avatar Jun 10 '21 00:06 jsimba-99