Patch for lib/galaxy/webapps/galaxy/api/provenance.py for optional dataset parameters
lib/galaxy/webapps/galaxy/api/provenance.py throws an exception when an optional dataset parameter is None Traceback (most recent call last): File "/Users/jj/gxt/gxt/lib/galaxy/web/framework/__init__.py", line 199, in decorator rval = func( self, trans, *args, **kwargs) File "/Users/jj/gxt/gxt/lib/galaxy/webapps/galaxy/api/provenance.py", line 18, in index value = self._get_provenance( trans, self.provenance_item_class, kwd[self.provenance_item_id], follow ) File "/Users/jj/gxt/gxt/lib/galaxy/webapps/galaxy/api/provenance.py", line 38, in _get_provenance out = self._get_record(trans, provenance_item, follow) File "/Users/jj/gxt/gxt/lib/galaxy/webapps/galaxy/api/provenance.py", line 50, in _get_record "parameters": self._get_job_record(trans, job, follow), File "/Users/jj/gxt/gxt/lib/galaxy/webapps/galaxy/api/provenance.py", line 65, in _get_job_record "id": trans.security.encode_id(in_d.dataset.id), AttributeError: 'NoneType' object has no attribute 'id' $ hg diff lib/galaxy/webapps/galaxy/api/provenance.py diff -r 228156daa575 lib/galaxy/webapps/galaxy/api/provenance.py --- a/lib/galaxy/webapps/galaxy/api/provenance.py Fri Nov 29 17:06:02 2013 -0500 +++ b/lib/galaxy/webapps/galaxy/api/provenance.py Sat Nov 30 08:08:56 2013 -0600 @@ -58,6 +58,8 @@ for p in job.parameters: out[p.name] = p.value for in_d in job.input_datasets: + if not in_d.dataset: + continue if follow: out[in_d.name] = self._get_record(trans, in_d.dataset, follow) else: -- James E. Johnson, Minnesota Supercomputing Institute, University of Minnesota
This patch has been merged into the stable and default branches of galaxy-central. Thanks for the contribution JJ! -John On Sat, Nov 30, 2013 at 8:23 AM, Jim Johnson <johns198@umn.edu> wrote:
lib/galaxy/webapps/galaxy/api/provenance.py throws an exception when an optional dataset parameter is None
Traceback (most recent call last): File "/Users/jj/gxt/gxt/lib/galaxy/web/framework/__init__.py", line 199, in decorator rval = func( self, trans, *args, **kwargs) File "/Users/jj/gxt/gxt/lib/galaxy/webapps/galaxy/api/provenance.py", line 18, in index value = self._get_provenance( trans, self.provenance_item_class, kwd[self.provenance_item_id], follow ) File "/Users/jj/gxt/gxt/lib/galaxy/webapps/galaxy/api/provenance.py", line 38, in _get_provenance out = self._get_record(trans, provenance_item, follow) File "/Users/jj/gxt/gxt/lib/galaxy/webapps/galaxy/api/provenance.py", line 50, in _get_record "parameters": self._get_job_record(trans, job, follow), File "/Users/jj/gxt/gxt/lib/galaxy/webapps/galaxy/api/provenance.py", line 65, in _get_job_record "id": trans.security.encode_id(in_d.dataset.id), AttributeError: 'NoneType' object has no attribute 'id'
$ hg diff lib/galaxy/webapps/galaxy/api/provenance.py diff -r 228156daa575 lib/galaxy/webapps/galaxy/api/provenance.py --- a/lib/galaxy/webapps/galaxy/api/provenance.py Fri Nov 29 17:06:02 2013 -0500 +++ b/lib/galaxy/webapps/galaxy/api/provenance.py Sat Nov 30 08:08:56 2013 -0600 @@ -58,6 +58,8 @@ for p in job.parameters: out[p.name] = p.value for in_d in job.input_datasets: + if not in_d.dataset: + continue if follow: out[in_d.name] = self._get_record(trans, in_d.dataset, follow) else:
-- James E. Johnson, Minnesota Supercomputing Institute, University of Minnesota
participants (2)
-
Jim Johnson
-
John Chilton