**Problem:** During a call to [models.nerve_anatomy](Models/nerve_anatomy.m)(in the mesh_generation subfunctions), you receive error messages from GMSH
followed by a MATLAB error, resembling the following:
m = mesh.make_gmsh_thinLayer(PN_mesh('.geo'), e.Perineurium_mm );
Error in models.nerve_anatomy (line 75)
m = generate_nerve_mesh(get_,named, e);
```
**Solution:** This is most often caused by bad mesh geometry (e.g. a fascicle clipping through the electrode array). To visualize the input geometry for the mesh, `cd(tools.cache)` (see [+tools.cache](Tools/cache.m), then open `nerve+array.geo` in GMSH to view the generated input geometry to the mesh.
Most commonly, this issue is corrected by adjusting the `-xMove` / `-xScale` /
`-xRotate` inputs to [mesh.insert_gmsh_fascicles](Mesh/insert_gmsh_fascicles.m). The [+plot](Plots/Overview) utility [+plots.preview_fascicles](Plots/preview_fascicles.m) is also helpful here.
**Problem:**`tools.cache('reset')`
<spanstyle="color: red;">
```
Error using rmdir: No directories were removed.
Error in tools.cache (line 67): rmdir(cachepath,'s');
```
</span>
**Solution:** Close any open files (e.g. a .geo file open in GMSH) and ensure that the MATLAB working directory is not in the directory you’re trying to remove (i.e. `pwd` is not in `C:\Users\user\AppData\Local\Temp\pn-mdl-*\`) before calling [tools.cache](Tools/cache.m).
**Problem:** `Unrecognized function or variable 'ctfroot'.` `Error in tools.file (line ...)`
**Solution:** This is an obsolete test to see if ViNERS is running in MATLAB or OCTAVE. If you are running MATLAB, replace `isempty(strfind(ctfroot,'MATLAB')) %#ok<STREMP>` with `false`. If you are running OCTAVE, replace `isempty(strfind(ctfroot,'MATLAB')) %#ok<STREMP>` with `true`. This issue can also be solved by installing the MATLAB compiler toolbox, or replacing with a call to `tools.isOctave`.
**Problem:** `Error using tools.parse_arguments (line 132)
expected positional argument 2: axons
Error in models.axon_thresholds (line 35) % most other modules are similar to this
**Solution:** Most [model components](Models/Overview) require both an EIDORS fields definition file (either a [sensitivity](Data/eidors_sensitivity.mat) or a [stimulus] (Data/eidors_stimulus.mat) file and an [axon population definition file](Data/axons.mat).
In this example, I got this error with a call to `models.axon_thresholds(opts,'-file', eidors_file)`.
I was able to fix this issue by either defining `opts.thresholds.axons = axons_file`, or by changing the call to `models.axon_thresholds(opts,'-file', eidors_file,'-axons', axons_file)`, or by changing the call to models.axon_thresholds(eidors_file, axons_file, opts). See also [+tools.opts_to_args](Tools/opts_to_args.m).
**Problem:**
```
Error using eidors_obj.
Error in function test_install (line 145)
EIDORS not correctly started. Did you do ">>run /path/to/eidors/startup"?
```
**Solution:** Something went wrong starting EIDORS. Try running [tools.setupEIDORS](Tools/Overview). That should produce the following output:
EIDORS:[EIDORS cache folder: C:/Users/user/Documents/MATLAB/EIDORS/eidors/models/cache (must be writable)]
EIDORS:[EIDORS model cache: C:/Users/user/Documents/MATLAB/EIDORS/eidors/models/cache]
EIDORS:[New to EIDORS? Have a look at the Tutorials.]
```
If that output does not appear, try running `eidors_startup`, which should be located in the folder returned by `tools.configuration('eidors')` (see [tools.configuration](Tools/configuration.m). If that fails still, `tools.fix_eidors_overloads` (new) is sometimes necessary depending on the versions of MATLAB and EIDORS (note: this modifies the EIDORS source code, please only run once). `global eidors_objects` may also give some insight into what is happening here.
# Common issues with ViNERS experimental code
(note: this is largely peripheral to ViNERS itself, but is included here for completeness. Some of the solutions to these problems )