Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encoding issues with coordinates in id_ranges? #824

Open
mlinderm opened this issue Aug 27, 2020 · 1 comment · May be fixed by #825
Open

Encoding issues with coordinates in id_ranges? #824

mlinderm opened this issue Aug 27, 2020 · 1 comment · May be fixed by #825

Comments

@mlinderm
Copy link

I am running into the following error with 1.6.2a1.dev415 and Python 3.6:

node003 2020-08-27 13:00:59,701 MainThread WARNING toil.leader: kind-run_merge_gams/instanceg9052nwo    Traceback (most recent call last):
node003 2020-08-27 13:00:59,701 MainThread WARNING toil.leader: kind-run_merge_gams/instanceg9052nwo      File "/modules/toil-vg/1.6.2a1.dev415/lib64/python3.6/site-packages/toil/worker.py", line 366, in workerScript
node003 2020-08-27 13:00:59,701 MainThread WARNING toil.leader: kind-run_merge_gams/instanceg9052nwo        job._runner(jobGraph=jobGraph, jobStore=jobStore, fileStore=fileStore, defer=defer)
node003 2020-08-27 13:00:59,701 MainThread WARNING toil.leader: kind-run_merge_gams/instanceg9052nwo      File "/modules/toil-vg/1.6.2a1.dev415/lib64/python3.6/site-packages/toil/job.py", line 1392, in _runner
node003 2020-08-27 13:00:59,702 MainThread WARNING toil.leader: kind-run_merge_gams/instanceg9052nwo        returnValues = self._run(jobGraph, fileStore)
node003 2020-08-27 13:00:59,702 MainThread WARNING toil.leader: kind-run_merge_gams/instanceg9052nwo      File "/modules/toil-vg/1.6.2a1.dev415/lib64/python3.6/site-packages/toil/job.py", line 1329, in _run
node003 2020-08-27 13:00:59,702 MainThread WARNING toil.leader: kind-run_merge_gams/instanceg9052nwo        return self.run(fileStore)
node003 2020-08-27 13:00:59,702 MainThread WARNING toil.leader: kind-run_merge_gams/instanceg9052nwo      File "/modules/toil-vg/1.6.2a1.dev415/lib64/python3.6/site-packages/toil/job.py", line 1533, in run
node003 2020-08-27 13:00:59,702 MainThread WARNING toil.leader: kind-run_merge_gams/instanceg9052nwo        rValue = userFunction(*((self,) + tuple(self._args)), **self._kwargs)
node003 2020-08-27 13:00:59,702 MainThread WARNING toil.leader: kind-run_merge_gams/instanceg9052nwo      File "/modules/toil-vg/1.6.2a1.dev415/lib64/python3.6/site-packages/toil_vg/vg_map.py", line 740, in run_merge_gams
node003 2020-08-27 13:00:59,702 MainThread WARNING toil.leader: kind-run_merge_gams/instanceg9052nwo        id_ranges = parse_id_ranges(job, id_ranges_file_id)
node003 2020-08-27 13:00:59,702 MainThread WARNING toil.leader: kind-run_merge_gams/instanceg9052nwo      File "/modules/toil-vg/1.6.2a1.dev415/lib64/python3.6/site-packages/toil_vg/vg_common.py", line 760, in parse_id_ranges
node003 2020-08-27 13:00:59,702 MainThread WARNING toil.leader: kind-run_merge_gams/instanceg9052nwo        return parse_id_ranges_file(id_range_file)
node003 2020-08-27 13:00:59,702 MainThread WARNING toil.leader: kind-run_merge_gams/instanceg9052nwo      File "/modules/toil-vg/1.6.2a1.dev415/lib64/python3.6/site-packages/toil_vg/vg_common.py", line 771, in parse_id_ranges_file
node003 2020-08-27 13:00:59,702 MainThread WARNING toil.leader: kind-run_merge_gams/instanceg9052nwo        id_ranges.append((toks[0], int(toks[1]), int(toks[2])))
node003 2020-08-27 13:00:59,703 MainThread WARNING toil.leader: kind-run_merge_gams/instanceg9052nwo    ValueError: invalid literal for int() with base 10: "b'1'"
node003 2020-08-27 13:00:59,703 MainThread WARNING toil.leader: kind-run_merge_gams/instanceg9052nwo    ERROR:toil.worker:Exiting the worker because of a failed job on host node003
node003 2020-08-27 13:00:59,703 MainThread WARNING toil.leader: kind-run_merge_gams/instanceg9052nwo    WARNING:toil.jobGraph:Due to failure we are reducing the remaining retry count of job 'run_merge_gams' kind-run_merge_gams/instanceg9052nwo with ID kind-run_merge_gams/instanceg9052nwo to 0
node003 2020-08-27 13:00:59,703 MainThread WARNING toil.leader: Job 'run_merge_gams' kind-run_merge_gams/instanceg9052nwo with ID kind-run_merge_gams/instanceg9052nwo is completely failed
node003 2020-08-27 13:01:09,764 MainThread INFO toil.leader: Finished toil run with 4 failed jobs.
node003 2020-08-27 13:01:09,764 MainThread INFO toil.leader: Failed jobs at end of the run: 'run_whole_alignment' kind-run_whole_alignment/instancey4ychoz6 'run_merge_gams' kind-run_merge_gams/instanceg9052nwo 'Job' kind-Job/instanceqrcmeifw 'run_split_reads' kind-run_write_info_to_outstore/instancepsa71z_h

I encountered the same error previously and tracked it to the bytes indicator b"..." getting written into the id_ranges file, e.g.

1       b'1'    b'7790661'
2       b'7790662'      b'15393655'
...

I stripped out the b' characters from the id_ranges files but am still running into errors in run_merge_gams. Are there other files I should/can fix up? It looks the problematic file is a temporary file.

@mlinderm mlinderm changed the title Python3 incompatibilities around coordinates in id_ranges Python3 incompatibilities around coordinates in id_ranges? Aug 27, 2020
@mlinderm mlinderm changed the title Python3 incompatibilities around coordinates in id_ranges? Encoding issues with coordinates in id_ranges? Aug 27, 2020
@adamnovak
Copy link
Member

Yeah, I think we want a .decode('utf-8') here and no random decodes in the rest of the function, so we pass around strings instead of bytes.

This whole loop should work in text and not bytes, as well.

adamnovak added a commit that referenced this issue Aug 27, 2020
@adamnovak adamnovak linked a pull request Aug 27, 2020 that will close this issue
adamnovak added a commit that referenced this issue Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants