Repository: nipy/nipype

Issue:
'MeshFixInputSpec' object has no attribute 'save_as_vrml'
### Summary

Hi, I'm a newbie and am currently trying to revive a [4 years old repository](https://github.com/CyclotronResearchCentre/forward). This code makes use of MeshFix interface. When running an example I get an `AttributeError`.

### Actual behavior

The code where the issue occures is the following:
```
input_to_fsmesh = pe.Node(interface=mf.MeshFix(), name='input_to_fsmesh')
input_to_fsmesh.inputs.dont_clean = True
input_to_fsmesh.inputs.save_as_freesurfer_mesh = True
```
It stops running at the last line with the error: 
```AttributeError: 'MeshFixInputSpec' object has no attribute 'save_as_vrml'```
The complete message is the following:
```
Exception occurred in traits notification handler for object: 
args = <undefined>
cut_inner = <undefined>
cut_outer = <undefined>
decouple_inin = <undefined>
decouple_outin = <undefined>
decouple_outout = <undefined>
dilation = <undefined>
dont_clean = True
environ = {}
epsilon_angle = <undefined>
finetuning_distance = <undefined>
finetuning_inwards = <undefined>
finetuning_outwards = <undefined>
finetuning_substeps = <undefined>
in_file1 = <undefined>
in_file2 = <undefined>
join_closest_components = <undefined>
join_overlapping_largest_components = <undefined>
laplacian_smoothing_steps = <undefined>
number_of_biggest_shells = <undefined>
out_filename = <undefined>
output_type = off
quiet_mode = <undefined>
remove_handles = <undefined>
save_as_freesurfer_mesh = True
save_as_stl = <undefined>
save_as_vmrl = <undefined>
set_intersections_to_one = <undefined>
uniform_remeshing_steps = <undefined>
uniform_remeshing_vertices = <undefined>
x_shift = <undefined>
, trait: save_as_freesurfer_mesh, old value: <undefined>, new value: True


Traceback (most recent call last):
File "/home/martin/local/miniconda3/lib/python3.5/site-packages/traits/trait_notifiers.py", line 519, 
in _dispatch_change_event
        self.dispatch( handler, *args )  
File "/home/martin/local/miniconda3/lib/python3.5/site-packages/traits/trait_notifiers.py", line 482, 
in dispatch
	handler( *args )  
File "/home/martin/local/miniconda3/lib/python3.5/site-packages/nipype/interfaces/base/specs.py", line 112, 
in _xor_warn    
        if isdefined(getattr(self, trait_name)):
AttributeError: 'MeshFixInputSpec' object has no attribute 'save_as_vrml'
Exception occurred in traits notification handler.
```

### Platform details:
```
{'commit_hash': '%h',
 'commit_source': 'archive substitution',
 'networkx_version': '2.1',
 'nibabel_version': '2.3.1',
 'nipype_version': '1.1.3',
 'numpy_version': '1.15.2',
 'pkg_path': '/home/martin/local/miniconda3/lib/python3.5/site-packages/nipype',
 'scipy_version': '1.1.0',
 'sys_executable': '/home/martin/local/miniconda3/bin/python',
 'sys_platform': 'linux',
 'sys_version': '3.5.6 |Anaconda, Inc.| (default, Aug 26 2018, 21:41:56) \n'
                '[GCC 7.3.0]',
 'traits_version': '4.6.0'}
```
To tell the exact truth my platform is WSL Ubuntu 18.04 as I have a Windows 10 laptop.

### Execution environment

My python environment outside container.



Discussion:
Looks like it should be `save_as_vmrl`, not `save_as_vrml`.
But I don't see any call to this attribute neither to `MeshFixInputSpec` anywhere in my code so why (and where) would there be such a typo?
Ah. I see, there's a typo here:

https://github.com/nipy/nipype/blob/704b97dee7848283692bac38f04541c5af2a87b5/nipype/interfaces/meshfix.py#L48-L51

Which is causing problems because of [these lines](https://github.com/CyclotronResearchCentre/forward/blob/94a6c2af58be59be9d779f4cc85af02532887f84/forward/struct.py#L262-L264):

```Python
    input_to_fsmesh = pe.Node(interface=mf.MeshFix(), name='input_to_fsmesh')
    input_to_fsmesh.inputs.dont_clean = True
    input_to_fsmesh.inputs.save_as_freesurfer_mesh = True
```

Any interest in submitting a quick patch? It will involve fixing the line in `nipype/interfaces/meshfix.py` and running `make specs`.
It would be great as it would allow me to work but if not possible, I can try to compile it from modified sources.

Resolving patch:
diff --git a/nipype/interfaces/meshfix.py b/nipype/interfaces/meshfix.py
--- a/nipype/interfaces/meshfix.py
+++ b/nipype/interfaces/meshfix.py
@@ -38,10 +38,10 @@ class MeshFixInputSpec(CommandLineInputSpec):
     dont_clean = traits.Bool(argstr='--no-clean', desc="Don't Clean")
 
     save_as_stl = traits.Bool(
-        xor=['save_as_vmrl', 'save_as_freesurfer_mesh'],
+        xor=['save_as_vrml', 'save_as_freesurfer_mesh'],
         argstr='--stl',
         desc="Result is saved in stereolithographic format (.stl)")
-    save_as_vmrl = traits.Bool(
+    save_as_vrml = traits.Bool(
         argstr='--wrl',
         xor=['save_as_stl', 'save_as_freesurfer_mesh'],
         desc="Result is saved in VRML1.0 format (.wrl)")
@@ -210,7 +210,7 @@ def _gen_outfilename(self):
         if self.inputs.save_as_stl or self.inputs.output_type == 'stl':
             self.inputs.output_type = 'stl'
             self.inputs.save_as_stl = True
-        if self.inputs.save_as_vmrl or self.inputs.output_type == 'vmrl':
-            self.inputs.output_type = 'vmrl'
-            self.inputs.save_as_vmrl = True
+        if self.inputs.save_as_vrml or self.inputs.output_type == 'vrml':
+            self.inputs.output_type = 'vrml'
+            self.inputs.save_as_vrml = True
         return name + '_fixed.' + self.inputs.output_type


Test patch:
diff --git a/nipype/interfaces/tests/test_auto_MeshFix.py b/nipype/interfaces/tests/test_auto_MeshFix.py
--- a/nipype/interfaces/tests/test_auto_MeshFix.py
+++ b/nipype/interfaces/tests/test_auto_MeshFix.py
@@ -67,9 +67,9 @@ def test_MeshFix_inputs():
         ),
         save_as_stl=dict(
             argstr='--stl',
-            xor=['save_as_vmrl', 'save_as_freesurfer_mesh'],
+            xor=['save_as_vrml', 'save_as_freesurfer_mesh'],
         ),
-        save_as_vmrl=dict(
+        save_as_vrml=dict(
             argstr='--wrl',
             xor=['save_as_stl', 'save_as_freesurfer_mesh'],
         ),