Skip to content
This repository was archived by the owner on Jul 18, 2023. It is now read-only.

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

Open
jsimba-99 opened this issue Jun 9, 2021 · 2 comments
Open

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

jsimba-99 opened this issue Jun 9, 2021 · 2 comments

Comments

@jsimba-99
Copy link

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,

@fxia22
Copy link
Collaborator

fxia22 commented Jun 10, 2021

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

@jsimba-99
Copy link
Author

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,

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants