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

Need a good way to read/find failed job logs #3004

Closed
johnbradley opened this issue Mar 9, 2020 · 4 comments · Fixed by #3008
Closed

Need a good way to read/find failed job logs #3004

johnbradley opened this issue Mar 9, 2020 · 4 comments · Fixed by #3008
Assignees

Comments

@johnbradley
Copy link
Contributor

johnbradley commented Mar 9, 2020

When a CWL workflow fails it can be difficult to find the error messages generated by the failing command. Is there any guidance on how this data could be pulled out from larger logs?

As a simple example here is a simple CWL tool that has an invalid argument:

#!/usr/bin/env cwl-runner

cwlVersion: v1.0
class: CommandLineTool
baseCommand: wc
arguments: ["-c", "--fake-arg"]
inputs:
  input_file:
    type: File
    inputBinding:
      position: 1
outputs: []

You can run it with toil like so: toil-cwl-runner wc-tool.cwl --input_file wc-tool.cwl
The following output is printed:

GCB-118-B.local 2020-03-09 12:16:11,597 MainThread INFO cwltool: Resolved 'wc-tool.cwl' to 'file:///Users/john/Documents/work/toil_log_fun/wc-tool.cwl'
GCB-118-B.local 2020-03-09 12:16:12,413 MainThread WARNING toil.batchSystems.singleMachine: Limiting maxCores to CPU count of system (8).
GCB-118-B.local 2020-03-09 12:16:12,413 MainThread WARNING toil.batchSystems.singleMachine: Limiting maxMemory to physically available memory (17179869184).
GCB-118-B.local 2020-03-09 12:16:12,413 MainThread WARNING toil.batchSystems.singleMachine: Limiting maxDisk to physically available disk (122682159104).
GCB-118-B.local 2020-03-09 12:16:12,428 MainThread INFO toil: Running Toil version 3.24.0-de586251cb579bcb80eef435825cb3cedc202f52.
GCB-118-B.local 2020-03-09 12:16:12,431 MainThread INFO toil.leader: Issued job 'file:///Users/john/Documents/work/toil_log_fun/wc-tool.cwl' wc kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs with job batch system ID: 0 and cores: 1, disk: 3.0 G, and memory: 2.0 G
INFO:toil.worker:Redirecting logging to /var/folders/fs/vv08ppmd1mj7g35hyq5m_7nr0000gp/T/toil-9d39cb7f-94e2-4093-8fa2-18e0f3ed86f9-268678283177431/tmp1xq4ln5c/worker_log.txt
GCB-118-B.local 2020-03-09 12:16:12,976 MainThread INFO toil.leader: Job ended: 'file:///Users/john/Documents/work/toil_log_fun/wc-tool.cwl' wc kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs
GCB-118-B.local 2020-03-09 12:16:12,977 MainThread WARNING toil.leader: The job seems to have left a log file, indicating failure: 'file:///Users/john/Documents/work/toil_log_fun/wc-tool.cwl' wc kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs
GCB-118-B.local 2020-03-09 12:16:12,978 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs    INFO:toil.worker:---TOIL WORKER OUTPUT LOG---
GCB-118-B.local 2020-03-09 12:16:12,978 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs    INFO:toil:Running Toil version 3.24.0-de586251cb579bcb80eef435825cb3cedc202f52.
GCB-118-B.local 2020-03-09 12:16:12,978 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs    [job wc-tool.cwl] /private/var/folders/fs/vv08ppmd1mj7g35hyq5m_7nr0000gp/T/toil-9d39cb7f-94e2-4093-8fa2-18e0f3ed86f9-268678283177431/tmp1xq4ln5c/236ed126-ea33-4dfb-971d-231c4cec5a25/th65xl57q/tmp-out2kh945vs$ wc \
GCB-118-B.local 2020-03-09 12:16:12,978 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs        -c \
GCB-118-B.local 2020-03-09 12:16:12,978 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs        --fake-arg \
GCB-118-B.local 2020-03-09 12:16:12,978 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs        /private/var/folders/fs/vv08ppmd1mj7g35hyq5m_7nr0000gp/T/tmprtmfb6h3/stg6fd80876-6308-423e-9d45-94eafb4a599d/wc-tool.cwl
GCB-118-B.local 2020-03-09 12:16:12,978 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs    INFO:cwltool:[job wc-tool.cwl] /private/var/folders/fs/vv08ppmd1mj7g35hyq5m_7nr0000gp/T/toil-9d39cb7f-94e2-4093-8fa2-18e0f3ed86f9-268678283177431/tmp1xq4ln5c/236ed126-ea33-4dfb-971d-231c4cec5a25/th65xl57q/tmp-out2kh945vs$ wc \
GCB-118-B.local 2020-03-09 12:16:12,978 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs        -c \
GCB-118-B.local 2020-03-09 12:16:12,978 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs        --fake-arg \
GCB-118-B.local 2020-03-09 12:16:12,978 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs        /private/var/folders/fs/vv08ppmd1mj7g35hyq5m_7nr0000gp/T/tmprtmfb6h3/stg6fd80876-6308-423e-9d45-94eafb4a599d/wc-tool.cwl
GCB-118-B.local 2020-03-09 12:16:12,978 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs    wc: illegal option -- -
GCB-118-B.local 2020-03-09 12:16:12,978 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs    usage: wc [-clmw] [file ...]
GCB-118-B.local 2020-03-09 12:16:12,979 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs    [job wc-tool.cwl] completed permanentFail
GCB-118-B.local 2020-03-09 12:16:12,979 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs    WARNING:cwltool:[job wc-tool.cwl] completed permanentFail
GCB-118-B.local 2020-03-09 12:16:12,979 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs    Traceback (most recent call last):
GCB-118-B.local 2020-03-09 12:16:12,979 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs      File "/Users/john/Documents/work/toil_log_fun/venv/lib/python3.7/site-packages/toil/worker.py", line 366, in workerScript
GCB-118-B.local 2020-03-09 12:16:12,979 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs        job._runner(jobGraph=jobGraph, jobStore=jobStore, fileStore=fileStore, defer=defer)
GCB-118-B.local 2020-03-09 12:16:12,979 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs      File "/Users/john/Documents/work/toil_log_fun/venv/lib/python3.7/site-packages/toil/job.py", line 1392, in _runner
GCB-118-B.local 2020-03-09 12:16:12,979 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs        returnValues = self._run(jobGraph, fileStore)
GCB-118-B.local 2020-03-09 12:16:12,979 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs      File "/Users/john/Documents/work/toil_log_fun/venv/lib/python3.7/site-packages/toil/job.py", line 1329, in _run
GCB-118-B.local 2020-03-09 12:16:12,979 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs        return self.run(fileStore)
GCB-118-B.local 2020-03-09 12:16:12,979 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs      File "/Users/john/Documents/work/toil_log_fun/venv/lib/python3.7/site-packages/toil/cwl/cwltoil.py", line 617, in run
GCB-118-B.local 2020-03-09 12:16:12,979 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs        raise cwltool.errors.WorkflowException(status)
GCB-118-B.local 2020-03-09 12:16:12,979 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs    cwltool.errors.WorkflowException: permanentFail
GCB-118-B.local 2020-03-09 12:16:12,979 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs    ERROR:toil.worker:Exiting the worker because of a failed job on host GCB-118-B.local
GCB-118-B.local 2020-03-09 12:16:12,980 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs    WARNING:toil.jobGraph:Due to failure we are reducing the remaining retry count of job 'file:///Users/john/Documents/work/toil_log_fun/wc-tool.cwl' wc kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs with ID kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs to 1
GCB-118-B.local 2020-03-09 12:16:12,980 MainThread INFO toil.leader: Issued job 'file:///Users/john/Documents/work/toil_log_fun/wc-tool.cwl' wc kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs with job batch system ID: 1 and cores: 1, disk: 3.0 G, and memory: 2.0 G
INFO:toil.worker:Redirecting logging to /var/folders/fs/vv08ppmd1mj7g35hyq5m_7nr0000gp/T/toil-9d39cb7f-94e2-4093-8fa2-18e0f3ed86f9-268678283177431/tmpp9d4fkra/worker_log.txt
GCB-118-B.local 2020-03-09 12:16:13,529 MainThread INFO toil.leader: Job ended: 'file:///Users/john/Documents/work/toil_log_fun/wc-tool.cwl' wc kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs
GCB-118-B.local 2020-03-09 12:16:13,530 MainThread WARNING toil.leader: The job seems to have left a log file, indicating failure: 'file:///Users/john/Documents/work/toil_log_fun/wc-tool.cwl' wc kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs
GCB-118-B.local 2020-03-09 12:16:13,530 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs    INFO:toil.worker:---TOIL WORKER OUTPUT LOG---
GCB-118-B.local 2020-03-09 12:16:13,530 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs    INFO:toil:Running Toil version 3.24.0-de586251cb579bcb80eef435825cb3cedc202f52.
GCB-118-B.local 2020-03-09 12:16:13,530 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs    [job wc-tool.cwl] /private/var/folders/fs/vv08ppmd1mj7g35hyq5m_7nr0000gp/T/toil-9d39cb7f-94e2-4093-8fa2-18e0f3ed86f9-268678283177431/tmpp9d4fkra/7459d00c-5ae0-456d-ae5d-552260cc7ef2/t3222intx/tmp-outqg5mn8ue$ wc \
GCB-118-B.local 2020-03-09 12:16:13,530 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs        -c \
GCB-118-B.local 2020-03-09 12:16:13,530 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs        --fake-arg \
GCB-118-B.local 2020-03-09 12:16:13,530 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs        /private/var/folders/fs/vv08ppmd1mj7g35hyq5m_7nr0000gp/T/tmp2bs1bxkz/stg5b1a6688-6e6b-407c-a6e4-2b22e9f994a2/wc-tool.cwl
GCB-118-B.local 2020-03-09 12:16:13,530 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs    INFO:cwltool:[job wc-tool.cwl] /private/var/folders/fs/vv08ppmd1mj7g35hyq5m_7nr0000gp/T/toil-9d39cb7f-94e2-4093-8fa2-18e0f3ed86f9-268678283177431/tmpp9d4fkra/7459d00c-5ae0-456d-ae5d-552260cc7ef2/t3222intx/tmp-outqg5mn8ue$ wc \
GCB-118-B.local 2020-03-09 12:16:13,530 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs        -c \
GCB-118-B.local 2020-03-09 12:16:13,530 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs        --fake-arg \
GCB-118-B.local 2020-03-09 12:16:13,530 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs        /private/var/folders/fs/vv08ppmd1mj7g35hyq5m_7nr0000gp/T/tmp2bs1bxkz/stg5b1a6688-6e6b-407c-a6e4-2b22e9f994a2/wc-tool.cwl
GCB-118-B.local 2020-03-09 12:16:13,531 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs    wc: illegal option -- -
GCB-118-B.local 2020-03-09 12:16:13,531 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs    usage: wc [-clmw] [file ...]
GCB-118-B.local 2020-03-09 12:16:13,531 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs    [job wc-tool.cwl] completed permanentFail
GCB-118-B.local 2020-03-09 12:16:13,531 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs    WARNING:cwltool:[job wc-tool.cwl] completed permanentFail
GCB-118-B.local 2020-03-09 12:16:13,531 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs    Traceback (most recent call last):
GCB-118-B.local 2020-03-09 12:16:13,531 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs      File "/Users/john/Documents/work/toil_log_fun/venv/lib/python3.7/site-packages/toil/worker.py", line 366, in workerScript
GCB-118-B.local 2020-03-09 12:16:13,531 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs        job._runner(jobGraph=jobGraph, jobStore=jobStore, fileStore=fileStore, defer=defer)
GCB-118-B.local 2020-03-09 12:16:13,531 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs      File "/Users/john/Documents/work/toil_log_fun/venv/lib/python3.7/site-packages/toil/job.py", line 1392, in _runner
GCB-118-B.local 2020-03-09 12:16:13,531 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs        returnValues = self._run(jobGraph, fileStore)
GCB-118-B.local 2020-03-09 12:16:13,531 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs      File "/Users/john/Documents/work/toil_log_fun/venv/lib/python3.7/site-packages/toil/job.py", line 1329, in _run
GCB-118-B.local 2020-03-09 12:16:13,531 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs        return self.run(fileStore)
GCB-118-B.local 2020-03-09 12:16:13,531 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs      File "/Users/john/Documents/work/toil_log_fun/venv/lib/python3.7/site-packages/toil/cwl/cwltoil.py", line 617, in run
GCB-118-B.local 2020-03-09 12:16:13,531 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs        raise cwltool.errors.WorkflowException(status)
GCB-118-B.local 2020-03-09 12:16:13,531 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs    cwltool.errors.WorkflowException: permanentFail
GCB-118-B.local 2020-03-09 12:16:13,532 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs    ERROR:toil.worker:Exiting the worker because of a failed job on host GCB-118-B.local
GCB-118-B.local 2020-03-09 12:16:13,532 MainThread WARNING toil.leader: kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs    WARNING:toil.jobGraph:Due to failure we are reducing the remaining retry count of job 'file:///Users/john/Documents/work/toil_log_fun/wc-tool.cwl' wc kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs with ID kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs to 0
GCB-118-B.local 2020-03-09 12:16:13,532 MainThread WARNING toil.leader: Job 'file:///Users/john/Documents/work/toil_log_fun/wc-tool.cwl' wc kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs with ID kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs is completely failed
GCB-118-B.local 2020-03-09 12:16:17,466 MainThread INFO toil.leader: Finished toil run with 1 failed jobs.
GCB-118-B.local 2020-03-09 12:16:17,466 MainThread INFO toil.leader: Failed jobs at end of the run: 'file:///Users/john/Documents/work/toil_log_fun/wc-tool.cwl' wc kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs
Traceback (most recent call last):
  File "/Users/john/Documents/work/toil_log_fun/venv/bin/toil-cwl-runner", line 10, in <module>
    sys.exit(main())
  File "/Users/john/Documents/work/toil_log_fun/venv/lib/python3.7/site-packages/toil/cwl/cwltoil.py", line 1357, in main
    result = toil.start(wf1)
  File "/Users/john/Documents/work/toil_log_fun/venv/lib/python3.7/site-packages/toil/common.py", line 800, in start
    return self._runMainLoop(rootJobGraph)
  File "/Users/john/Documents/work/toil_log_fun/venv/lib/python3.7/site-packages/toil/common.py", line 1070, in _runMainLoop
    jobCache=self._jobCache).run()
  File "/Users/john/Documents/work/toil_log_fun/venv/lib/python3.7/site-packages/toil/leader.py", line 246, in run
    raise FailedJobsException(self.config.jobStore, self.toilState.totalFailedJobs, self.jobStore)
toil.leader.FailedJobsException

Github does a pretty good job lining up the above text, but in the terminal it is harder to read due the line wrapping.

Are there any commands or scripts that might parse output logs or other data and provide easier to read logs?

Thanks.

┆Issue is synchronized with this Jira Task
┆Issue Number: TOIL-524

@adamnovak
Copy link
Member

adamnovak commented Mar 9, 2020

We sadly don't have anything to filter down the Toil logs to just the good parts right now. But we ought to come up with something. It's a common usability complaint that the logs are very verbose and hard to find the actual problem in, between all the stuff Toil prints at WARNING level, the long prefixes it adds to job log lines, and the stuff at the end where it just complains nonspecifically that jobs failed.

The logs ought to still be in the job store AFAIK, if you didn't say --clean always. We probably want to make sure you can get a job's error log with toil status or maybe a new toil log, and just have the FailedJobsException message say something like "Run `toil status /tmp/wherever/toil/puts/cwl/job/stores kind-file_Users_john_Documents_work_toil_log_fun_wc-tool.cwl/instancepb96z3fs` to see job error log." right at the very end of the output. Then you could run that and dump just that job's log, without all this prefix garbage.

@adamnovak adamnovak changed the title CWL: Reading failed job logs Need a good way to read/find failed job logs Mar 9, 2020
@johnbradley
Copy link
Contributor Author

Thanks @adamnovak. I found that I can get the logs using toil status --printLogs <jobstore_path> when using python 2. With python 3 I get an error:

Traceback (most recent call last):
  File "/Users/jpb67/Documents/work/toil_log_fun/venv/bin/toil", line 10, in <module>
    sys.exit(main())
  File "/Users/jpb67/Documents/work/toil_log_fun/venv/lib/python3.7/site-packages/toil/utils/toilMain.py", line 35, in main
    module.main()
  File "/Users/jpb67/Documents/work/toil_log_fun/venv/lib/python3.7/site-packages/toil/utils/toilStatus.py", line 365, in main
    status.printJobLog()
  File "/Users/jpb67/Documents/work/toil_log_fun/venv/lib/python3.7/site-packages/toil/utils/toilStatus.py", line 83, in printJobLog
    msg += fH.read()
TypeError: can only concatenate str (not "bytes") to str

I can create a PR to fix this bytes conversion issue if you would like.

@adamnovak
Copy link
Member

adamnovak commented Mar 9, 2020 via email

johnbradley added a commit to johnbradley/toil that referenced this issue Mar 10, 2020
Test to reproduce `TypeError: can only concatenate str (not "bytes") to str` error.
johnbradley added a commit to johnbradley/toil that referenced this issue Mar 10, 2020
adamnovak pushed a commit that referenced this issue Mar 11, 2020
Test to reproduce `TypeError: can only concatenate str (not "bytes") to str` error.
adamnovak pushed a commit that referenced this issue Mar 11, 2020
Fix for problem raised in issue #3004
@adamnovak
Copy link
Member

It turns out that the toil.leader.FailedJobsException already has a bunch of machinery to dump the logs of failed jobs at the end of the run, but it got disconnected by changes to how exceptions work in Python 3.

I'm going to hook it back up and also change how logs are dumped in the middle of the run to look nicer.

adamnovak pushed a commit that referenced this issue Mar 11, 2020
* add test for issue #3004

Test to reproduce `TypeError: can only concatenate str (not "bytes") to str` error.

* printJobLog convert bytes to utf-8

Fix for problem raised in issue #3004

* improve printJobLog test method

* remove unused mock_open import
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