problem running a .bvproc from the command line

Questions about BrainVisa usage and installation

Moderators: denghien, riviere

Post Reply
SylvainT
Posts: 73
Joined: Mon Feb 13, 2006 6:37 pm
Location: INT, Marseille, France

problem running a .bvproc from the command line

Post by SylvainT »

Hello,

I'm trying to run a process that I saved but I'm getting some errors... The file .bvproc has been created by setting up a process in the GUI (the process is "Import FreeSurfer grey/white segmentation to Morphologist", I tested it and it runs perfectly fine from the GUI, then I try to run the same from the command line using "brainvisa -r myprocess.bvproc" and I get the following error:

Code: Select all

/brainvisa -r myprocess.bvproc
Loading toolbox baby
Loading toolbox connectomist
Loading toolbox cortical_surface
Loading toolbox data management
Loading toolbox datamind
Loading toolbox diffuse
Loading toolbox freesurfer
Loading toolbox morphologist
Loading toolbox structural_analysis
Loading toolbox tms
Loading toolbox tools
Loading toolbox viewers
Loading toolbox My processes

Process Import FreeSurfer grey/white segmentation to Morphologist started on
2018/01/23 16:11
Convert .mgz to .nii with FreeSurfer
Import data into database with brainvisa ontology
filein  : /tmp/bv_416_0.nii
fileout : /my_bv_database_dir/subjects/sub-CC420231/t1mri/default_acquisition/sub-CC420231.nii.gz
encoding: Binary
normal  : 0
rescale : 0
format  : 
type    : S16
objtype : 
xdim    : 0
ydim    : 0
zdim    : 0
imin    : default
imax    : default
omin    : default
omax    : default
reading /tmp/bv_416_0.nii as Volume / U8...
reading done
convert to Volume / S16
converting data...
convert done
writing /my_bv_database_dir/subjects/sub-CC420231/t1mri/default_acquisition/sub-CC420231.nii.gz...
done
Convert Talairach_Auto into AC-PC File
AC: [131, 122, 120] , mm: [131.26419067382812, 121.64608764648438,
120.43965911865234]
PC: [131, 151, 117] , mm: [131.3173646957148, 151.27621817588806,
117.46495588123798]
IP: [132, 162, 67] , mm: [132.32579288538545, 161.71124368160963,
67.08124941587448]
Create right/left grey white files from ribbon freesurfer data
Create brain mask file from ribbon freesurfer data
Create split brain file from ribbon freesurfer data
Launch T1BiasCorrection
Launch VipGreyStatFromClassif to generate a histo analysis file
Warning: pyaimsgui not available
Now run the last part of the regular Morphologist pipeline.
ERROR in Check SPAM models installation 1 'Configuration' object has no
attribute 'sulci'

--------------------------------------------------------------------------------
AttributeError
processes.py (3035) in _processExecution:

result = process.execution(self)

check_spam_models.py (43) in execution:

if not ap.configuration.sulci.check_spam_models:

signature.py (734) in __getattribute__:

return super( HasSignature, self ).__getattribute__( name )

Process Import FreeSurfer grey/white segmentation to Morphologist finished on
2018/01/23 16:11 (46 seconds)
ERROR 1

--------------------------------------------------------------------------------
SystemExit
processes.py (179) in initializeProcesses:

six.exec_(f, localsStartup, localsStartup)

six.py (638) in exec_:

exec("""exec _code_ in _globs_, _locs_""")

<string> (1) in <module>:

?

<string> (1) in <module>:

?

processes.py (2767) in runProcess:

result = self._processExecution(_process, None)

processes.py (3035) in _processExecution:

result = process.execution(self)

Import_FROM_FreeSurfer_TO_Morpho.py (335) in execution:

enode.HemispheresProcessing.LeftHemisphere.SulciRecognition.setSelected( True )

processes.py (2020) in setSelected:

self._selectionChange.notify(self)

notification.py (143) in notify:

listener(*args)

morphologist.py (95) in __call__:

defaultContext().runProcess( proc )

processes.py (2767) in runProcess:

result = self._processExecution(_process, None)

processes.py (3041) in _processExecution:

self._showException()

processes.py (3510) in _showException:

sys.exit(1)

ERROR temporary file /tmp/bv_416_1.nii not deleted
'NoneType' object has no attribute 'removePath'

--------------------------------------------------------------------------------
AttributeError
neuroDiskItems.py (2380) in __del__:

temporary.manager.removePath( f )

Exception AttributeError: "'NoneType' object has no attribute 'registerPath'" in <bound method TemporaryDiskItem.__del__ of '/tmp/bv_416_1.nii'> ignored
ERROR temporary file /tmp/bv_416_2.trm not deleted
'NoneType' object has no attribute 'removePath'

--------------------------------------------------------------------------------
AttributeError
neuroDiskItems.py (2380) in __del__:

temporary.manager.removePath( f )

Exception AttributeError: "'NoneType' object has no attribute 'registerPath'" in <bound method TemporaryDiskItem.__del__ of '/tmp/bv_416_2.trm'> ignored
ERROR temporary file /tmp/bv_416_3.nii not deleted
'NoneType' object has no attribute 'removePath'

--------------------------------------------------------------------------------
AttributeError
neuroDiskItems.py (2380) in __del__:

temporary.manager.removePath( f )

Exception AttributeError: "'NoneType' object has no attribute 'registerPath'" in <bound method TemporaryDiskItem.__del__ of '/tmp/bv_416_3.nii'> ignored

Just to double check, I exited from the BrainVISA GUI, restarted it, reloaded the same .bvproc, launched it, and it runs perfectly...

Any idea how to solve this?

Thanks,

Sylvain
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Re: problem running a .bvproc from the command line

Post by riviere »

Hi Sylvain,
I haven't had a look at it but I may have a clue: processes run from the commandline run by default with databasing disabled. This process probably makes use of the databasing capabilities, so doesn't work when databasing is disabled.
You can try it with DB forced enabled. You may use the more modern alternative to brainvisa -r: axon-runprocess, which allows more options:

Code: Select all

axon-runprocess --enabledb myprocess.bvproc
Denis
SylvainT
Posts: 73
Joined: Mon Feb 13, 2006 6:37 pm
Location: INT, Marseille, France

Re: problem running a .bvproc from the command line

Post by SylvainT »

Thanks Denis, it works!
(I had read about the "enabledb" option somewhere else on the forum when I dug about this yesterday, but I hadn't make the connection with my error... now it makes sense, I've understood that the "Check SPAM model installation" process needs the database to work!)
Post Reply