DRMAA: TypeError: check_tool_output() takes exactly 5 arguments (4 given)
Hi all (and in particular, Scott), I've just updated my development server and found the following error when running jobs on our SGE cluster via DRMMA: galaxy.jobs.runners.drmaa ERROR 2012-09-18 09:43:20,698 Job wrapper finish method failed Traceback (most recent call last): File "/mnt/galaxy/galaxy-central/lib/galaxy/jobs/runners/drmaa.py", line 371, in finish_job drm_job_state.job_wrapper.finish( stdout, stderr, exit_code ) File "/mnt/galaxy/galaxy-central/lib/galaxy/jobs/__init__.py", line 1048, in finish if ( self.check_tool_output( stdout, stderr, tool_exit_code ) ): TypeError: check_tool_output() takes exactly 5 arguments (4 given) This looks to have been introduced in this commit: https://bitbucket.org/galaxy/galaxy-central/changeset/f557b7b05fdd701cbf99ee... There should be an additional jobs argument, proposed fix: $ hg diff lib/galaxy/jobs/__init__.py diff -r 4007494e37e1 lib/galaxy/jobs/__init__.py --- a/lib/galaxy/jobs/__init__.py Tue Sep 18 09:40:19 2012 +0100 +++ b/lib/galaxy/jobs/__init__.py Tue Sep 18 10:06:44 2012 +0100 @@ -1045,7 +1045,8 @@ # Check what the tool returned. If the stdout or stderr matched # regular expressions that indicate errors, then set an error. # The same goes if the tool's exit code was in a given range. - if ( self.check_tool_output( stdout, stderr, tool_exit_code ) ): + job = self.get_job() + if ( self.check_tool_output( stdout, stderr, tool_exit_code, job ) ): task.state = task.states.OK else: task.state = task.states.ERROR (Let me know if you want this as a pull request - it seems a lot of effort for a tiny change.) Regards, Peter
I'll check it out. Thanks. ----- Original Message -----
Hi all (and in particular, Scott),
I've just updated my development server and found the following error when running jobs on our SGE cluster via DRMMA:
galaxy.jobs.runners.drmaa ERROR 2012-09-18 09:43:20,698 Job wrapper finish method failed Traceback (most recent call last): File "/mnt/galaxy/galaxy-central/lib/galaxy/jobs/runners/drmaa.py", line 371, in finish_job drm_job_state.job_wrapper.finish( stdout, stderr, exit_code ) File "/mnt/galaxy/galaxy-central/lib/galaxy/jobs/__init__.py", line 1048, in finish if ( self.check_tool_output( stdout, stderr, tool_exit_code ) ): TypeError: check_tool_output() takes exactly 5 arguments (4 given)
This looks to have been introduced in this commit: https://bitbucket.org/galaxy/galaxy-central/changeset/f557b7b05fdd701cbf99ee...
There should be an additional jobs argument, proposed fix:
$ hg diff lib/galaxy/jobs/__init__.py diff -r 4007494e37e1 lib/galaxy/jobs/__init__.py --- a/lib/galaxy/jobs/__init__.py Tue Sep 18 09:40:19 2012 +0100 +++ b/lib/galaxy/jobs/__init__.py Tue Sep 18 10:06:44 2012 +0100 @@ -1045,7 +1045,8 @@ # Check what the tool returned. If the stdout or stderr matched # regular expressions that indicate errors, then set an error. # The same goes if the tool's exit code was in a given range. - if ( self.check_tool_output( stdout, stderr, tool_exit_code ) ): + job = self.get_job() + if ( self.check_tool_output( stdout, stderr, tool_exit_code, job ) ): task.state = task.states.OK else: task.state = task.states.ERROR
(Let me know if you want this as a pull request - it seems a lot of effort for a tiny change.)
Regards,
Peter
I have to admit that I'm a little confused as to why you would be getting this error at all - the "job" variable is introduced at line 298 in the same file, and it's used as the last variable to check_tool_output in the changeset you pointed to. (Also, thanks for pointing to it - that made investigating easier.) Is it possible that there was a merge problem when you pulled the latest set of code? For my own sanity, would you mind downloading a fresh copy of galaxy-central or galaxy-dist into a separate directory and see if the problem is still there? (I fully admit that there could be a bug that I left in, but all job runners should have stumbled across the same problem - the "finish" method should be called by all job runners.) Thanks again! -Scott ----- Original Message -----
I'll check it out. Thanks.
----- Original Message -----
Hi all (and in particular, Scott),
I've just updated my development server and found the following error when running jobs on our SGE cluster via DRMMA:
galaxy.jobs.runners.drmaa ERROR 2012-09-18 09:43:20,698 Job wrapper finish method failed Traceback (most recent call last): File "/mnt/galaxy/galaxy-central/lib/galaxy/jobs/runners/drmaa.py", line 371, in finish_job drm_job_state.job_wrapper.finish( stdout, stderr, exit_code ) File "/mnt/galaxy/galaxy-central/lib/galaxy/jobs/__init__.py", line 1048, in finish if ( self.check_tool_output( stdout, stderr, tool_exit_code ) ): TypeError: check_tool_output() takes exactly 5 arguments (4 given)
This looks to have been introduced in this commit: https://bitbucket.org/galaxy/galaxy-central/changeset/f557b7b05fdd701cbf99ee...
There should be an additional jobs argument, proposed fix:
$ hg diff lib/galaxy/jobs/__init__.py diff -r 4007494e37e1 lib/galaxy/jobs/__init__.py --- a/lib/galaxy/jobs/__init__.py Tue Sep 18 09:40:19 2012 +0100 +++ b/lib/galaxy/jobs/__init__.py Tue Sep 18 10:06:44 2012 +0100 @@ -1045,7 +1045,8 @@ # Check what the tool returned. If the stdout or stderr matched # regular expressions that indicate errors, then set an error. # The same goes if the tool's exit code was in a given range. - if ( self.check_tool_output( stdout, stderr, tool_exit_code ) ): + job = self.get_job() + if ( self.check_tool_output( stdout, stderr, tool_exit_code, job ) ): task.state = task.states.OK else: task.state = task.states.ERROR
(Let me know if you want this as a pull request - it seems a lot of effort for a tiny change.)
Regards,
Peter
___________________________________________________________ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at:
On Tue, Sep 18, 2012 at 2:55 PM, Scott McManus <scottmcmanus@gatech.edu> wrote:
I have to admit that I'm a little confused as to why you would be getting this error at all - the "job" variable is introduced at line 298 in the same file, and it's used as the last variable to check_tool_output in the changeset you pointed to. (Also, thanks for pointing to it - that made investigating easier.)
Is it possible that there was a merge problem when you pulled the latest set of code? For my own sanity, would you mind downloading a fresh copy of galaxy-central or galaxy-dist into a separate directory and see if the problem is still there? (I fully admit that there could be a bug that I left in, but all job runners should have stumbled across the same problem - the "finish" method should be called by all job runners.)
I've not done a fresh install, but just browsing on bitbucket there is an inconsistency in the self.check_tool_output(...) call signature: https://bitbucket.org/galaxy/galaxy-central/src/5359d1066d91/lib/galaxy/jobs... e.g. $ curl -s https://bitbucket.org/galaxy/galaxy-central/raw/5359d1066d91/lib/galaxy/jobs... | grep check_tool_output if ( self.check_tool_output( stdout, stderr, tool_exit_code, job )): def check_tool_output( self, stdout, stderr, tool_exit_code, job ): if ( self.check_tool_output( stdout, stderr, tool_exit_code ) ): Clearly the last occurrence of self.check_tool_output(...) is not including the job argument (line 1048, in class TaskWrapper). I suspect you need to have use_tasked_jobs = True in universe_wsgi.ini to hit this code branch. Peter
Is it possible that you are looking at different classes? TaskWrapper's finish method does not use the job variable in my recently merged code either (line ~1045), while JobWrapper's does around line 315. cheers, jorrit On 09/18/2012 03:55 PM, Scott McManus wrote:
I have to admit that I'm a little confused as to why you would be getting this error at all - the "job" variable is introduced at line 298 in the same file, and it's used as the last variable to check_tool_output in the changeset you pointed to. (Also, thanks for pointing to it - that made investigating easier.)
Is it possible that there was a merge problem when you pulled the latest set of code? For my own sanity, would you mind downloading a fresh copy of galaxy-central or galaxy-dist into a separate directory and see if the problem is still there? (I fully admit that there could be a bug that I left in, but all job runners should have stumbled across the same problem - the "finish" method should be called by all job runners.)
Thanks again!
-Scott
----- Original Message -----
I'll check it out. Thanks.
----- Original Message -----
Hi all (and in particular, Scott),
I've just updated my development server and found the following error when running jobs on our SGE cluster via DRMMA:
galaxy.jobs.runners.drmaa ERROR 2012-09-18 09:43:20,698 Job wrapper finish method failed Traceback (most recent call last): File "/mnt/galaxy/galaxy-central/lib/galaxy/jobs/runners/drmaa.py", line 371, in finish_job drm_job_state.job_wrapper.finish( stdout, stderr, exit_code ) File "/mnt/galaxy/galaxy-central/lib/galaxy/jobs/__init__.py", line 1048, in finish if ( self.check_tool_output( stdout, stderr, tool_exit_code ) ): TypeError: check_tool_output() takes exactly 5 arguments (4 given)
This looks to have been introduced in this commit: https://bitbucket.org/galaxy/galaxy-central/changeset/f557b7b05fdd701cbf99ee...
There should be an additional jobs argument, proposed fix:
$ hg diff lib/galaxy/jobs/__init__.py diff -r 4007494e37e1 lib/galaxy/jobs/__init__.py --- a/lib/galaxy/jobs/__init__.py Tue Sep 18 09:40:19 2012 +0100 +++ b/lib/galaxy/jobs/__init__.py Tue Sep 18 10:06:44 2012 +0100 @@ -1045,7 +1045,8 @@ # Check what the tool returned. If the stdout or stderr matched # regular expressions that indicate errors, then set an error. # The same goes if the tool's exit code was in a given range. - if ( self.check_tool_output( stdout, stderr, tool_exit_code ) ): + job = self.get_job() + if ( self.check_tool_output( stdout, stderr, tool_exit_code, job ) ): task.state = task.states.OK else: task.state = task.states.ERROR
(Let me know if you want this as a pull request - it seems a lot of effort for a tiny change.)
Regards,
Peter
___________________________________________________________ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at:
___________________________________________________________ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at:
Thanks, Jorrit! That was a good catch. Yes, it's a problem with the TaskWrapper. I'll see what I can do about it. -Scott ----- Original Message -----
Is it possible that you are looking at different classes? TaskWrapper's finish method does not use the job variable in my recently merged code either (line ~1045), while JobWrapper's does around line 315.
cheers, jorrit
On 09/18/2012 03:55 PM, Scott McManus wrote:
I have to admit that I'm a little confused as to why you would be getting this error at all - the "job" variable is introduced at line 298 in the same file, and it's used as the last variable to check_tool_output in the changeset you pointed to. (Also, thanks for pointing to it - that made investigating easier.)
Is it possible that there was a merge problem when you pulled the latest set of code? For my own sanity, would you mind downloading a fresh copy of galaxy-central or galaxy-dist into a separate directory and see if the problem is still there? (I fully admit that there could be a bug that I left in, but all job runners should have stumbled across the same problem - the "finish" method should be called by all job runners.)
Thanks again!
-Scott
----- Original Message -----
I'll check it out. Thanks.
----- Original Message -----
Hi all (and in particular, Scott),
I've just updated my development server and found the following error when running jobs on our SGE cluster via DRMMA:
galaxy.jobs.runners.drmaa ERROR 2012-09-18 09:43:20,698 Job wrapper finish method failed Traceback (most recent call last): File "/mnt/galaxy/galaxy-central/lib/galaxy/jobs/runners/drmaa.py", line 371, in finish_job drm_job_state.job_wrapper.finish( stdout, stderr, exit_code ) File "/mnt/galaxy/galaxy-central/lib/galaxy/jobs/__init__.py", line 1048, in finish if ( self.check_tool_output( stdout, stderr, tool_exit_code ) ): TypeError: check_tool_output() takes exactly 5 arguments (4 given)
This looks to have been introduced in this commit: https://bitbucket.org/galaxy/galaxy-central/changeset/f557b7b05fdd701cbf99ee...
There should be an additional jobs argument, proposed fix:
$ hg diff lib/galaxy/jobs/__init__.py diff -r 4007494e37e1 lib/galaxy/jobs/__init__.py --- a/lib/galaxy/jobs/__init__.py Tue Sep 18 09:40:19 2012 +0100 +++ b/lib/galaxy/jobs/__init__.py Tue Sep 18 10:06:44 2012 +0100 @@ -1045,7 +1045,8 @@ # Check what the tool returned. If the stdout or stderr matched # regular expressions that indicate errors, then set an error. # The same goes if the tool's exit code was in a given range. - if ( self.check_tool_output( stdout, stderr, tool_exit_code ) ): + job = self.get_job() + if ( self.check_tool_output( stdout, stderr, tool_exit_code, job ) ): task.state = task.states.OK else: task.state = task.states.ERROR
(Let me know if you want this as a pull request - it seems a lot of effort for a tiny change.)
Regards,
Peter
___________________________________________________________ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at:
___________________________________________________________ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at:
On Tue, Sep 18, 2012 at 3:09 PM, Jorrit Boekel <jorrit.boekel@scilifelab.se> wrote:
Is it possible that you are looking at different classes? TaskWrapper's finish method does not use the job variable in my recently merged code either (line ~1045), while JobWrapper's does around line 315.
cheers, jorrit
Yes exactly (as per my follow up email sent just before yours ;) ) Peter
Ok - that change was made. The difference is that the change is applied to the task instead of the job. It's in changeset 7713:bfd10aa67c78, and it ran successfully in my environments on local, pbs, and drmaa runners. Let me know if there are any problems. Thanks again for your patience. -Scott ----- Original Message -----
On Tue, Sep 18, 2012 at 3:09 PM, Jorrit Boekel <jorrit.boekel@scilifelab.se> wrote:
Is it possible that you are looking at different classes? TaskWrapper's finish method does not use the job variable in my recently merged code either (line ~1045), while JobWrapper's does around line 315.
cheers, jorrit
Yes exactly (as per my follow up email sent just before yours ;) )
Peter
Sorry - that's changeset 7714:3f12146d6d81 -Scott ----- Original Message -----
Ok - that change was made. The difference is that the change is applied to the task instead of the job. It's in changeset 7713:bfd10aa67c78, and it ran successfully in my environments on local, pbs, and drmaa runners. Let me know if there are any problems.
Thanks again for your patience.
-Scott
----- Original Message -----
On Tue, Sep 18, 2012 at 3:09 PM, Jorrit Boekel <jorrit.boekel@scilifelab.se> wrote:
Is it possible that you are looking at different classes? TaskWrapper's finish method does not use the job variable in my recently merged code either (line ~1045), while JobWrapper's does around line 315.
cheers, jorrit
Yes exactly (as per my follow up email sent just before yours ;) )
Peter
___________________________________________________________ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at:
On Tue, Sep 18, 2012 at 7:11 PM, Scott McManus <scottmcmanus@gatech.edu> wrote:
Sorry - that's changeset 7714:3f12146d6d81
-Scott
Hi Scott, The good news is this error does seem to be fixed as of that commit: TypeError: check_tool_output() takes exactly 5 arguments (4 given) The bad news is my cluster jobs still aren't working properly (using a job splitter). The jobs seem to run, get submitted to the cluster, and finish, and the data looks OK via the 'eye' view icon, but is red in the history with: 0 bytes An error occurred running this job: info unavailable I will investigate - it is likely due to another change... perhaps in the new stdout/stderr/return code support? Peter
Odd, it works for me on EC2/Cloudman. jorrit On 09/19/2012 03:29 PM, Peter Cock wrote:
On Tue, Sep 18, 2012 at 7:11 PM, Scott McManus <scottmcmanus@gatech.edu> wrote:
Sorry - that's changeset 7714:3f12146d6d81
-Scott Hi Scott,
The good news is this error does seem to be fixed as of that commit:
TypeError: check_tool_output() takes exactly 5 arguments (4 given)
The bad news is my cluster jobs still aren't working properly (using a job splitter). The jobs seem to run, get submitted to the cluster, and finish, and the data looks OK via the 'eye' view icon, but is red in the history with:
0 bytes An error occurred running this job: info unavailable
I will investigate - it is likely due to another change... perhaps in the new stdout/stderr/return code support?
Peter ___________________________________________________________ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at:
participants (3)
-
Jorrit Boekel
-
Peter Cock
-
Scott McManus