'NoneType' object has no attribute 'id'

13 views
Skip to first unread message

Marcel Zwiers

unread,
Mar 16, 2017, 1:05:12 PM3/16/17
to Fastr Users
I got this error when running my network (see below). I'm not sure whether this is due to an error in my own code (probably yes) or that it is a bug in fastr or something else. I don't know how to debug this or how proceed from here, any suggestions? The logs or tmp directories don't provide much information (to me at least). Is there some debug documentation/guidance somewhere?

[..]
[INFO]      node:1235 >> Creating job for node fastr:///networks/subcortical_segmentation/nodelist/first_segmentation sample id <SampleId ('S1',)>, index <SampleIndex (0)>
Traceback (most recent call last):
[..]
  File "/home/mrphys/marzwi/.conda/envs/fastr/lib/python2.7/site-packages/fastr/core/node.py", line 1315, in _wrap_arguments
    'datatype': output.resulting_datatype.id}

AttributeError: 'NoneType' object has no attribute 'id'

Marcel Zwiers

unread,
Mar 16, 2017, 1:08:25 PM3/16/17
to Fastr Users
Here's the full trace:


Traceback (most recent call last):

  File "<ipython-input-22-c1a33b55fff3>", line 1, in <module>
    runfile('/home/mrphys/marzwi/python/bbmri/fastrtools/test_fsl_first.py', wdir='/home/mrphys/marzwi/python/bbmri/fastrtools')

  File "/home/mrphys/marzwi/.conda/envs/fastr/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 866, in runfile
    execfile(filename, namespace)

  File "/home/mrphys/marzwi/.conda/envs/fastr/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 94, in execfile
    builtins.execfile(filename, *where)

  File "/home/mrphys/marzwi/python/bbmri/fastrtools/test_fsl_first.py", line 65, in <module>
    network.execute(source_data, sink_data)

  File "/home/mrphys/marzwi/.conda/envs/fastr/lib/python2.7/site-packages/fastr/core/network.py", line 990, in execute
    joblist += node.execute()

  File "/home/mrphys/marzwi/.conda/envs/fastr/lib/python2.7/site-packages/fastr/core/node.py", line 1149, in execute
    job_list.append(self.create_job(sample_id, sample_index, job_data, job_depends))

  File "/home/mrphys/marzwi/.conda/envs/fastr/lib/python2.7/site-packages/fastr/core/node.py", line 1239, in create_job
    input_arguments, output_arguments = self._wrap_arguments(job_data, sample_id, sample_index)


  File "/home/mrphys/marzwi/.conda/envs/fastr/lib/python2.7/site-packages/fastr/core/node.py", line 1315, in _wrap_arguments
    'datatype': output.resulting_datatype.id}

AttributeError: 'NoneType' object has no attribute 'id'


Op donderdag 16 maart 2017 18:05:12 UTC+1 schreef Marcel Zwiers:

Hakim Achterberg

unread,
Mar 16, 2017, 1:36:00 PM3/16/17
to Fastr Users
Seems it cannot find the resulting_datatype, this is most likely because a preferred datatype was not set somewhere and there are multiple options, but I am a bit curious why this doesn't give an error anymore (seems rather unsafe that it gives a way more random error doesn't it?) I will look into it further tomorrow afternoon or Monday.
Reply all
Reply to author
Forward
0 new messages