# Error response function

**URL:** <https://community.mrtrix.org/t/error-response-function/393>\
**Category:** Uncategorized\
**Created:** [August 16, 2016, 11:19pm UTC](https://community.mrtrix.org/t/error-response-function/393 "2016-08-16T23:19:21Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![rsmith](https://community.mrtrix.org/user_avatar/community.mrtrix.org/rsmith/32/2672_2.png) [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Post date:** [August 17, 2016, 3:18am UTC](https://community.mrtrix.org/t/error-response-function/393/6 "2016-08-17T03:18:27Z")

</div>

Good to know!

I did a little more digging, since I was curious as to why both here and in [another thread](https://community.mrtrix.org/t/error-of-running-population-template/395) the script isn’t capturing any of the terminal output from the unsuccessful command:

`dwi2response: Output of failed command:`  
_tumbleweed appears on terminal_  
😞

The problem is that when the fatal error occurs, the relevant (non-_MRtrix3_) library doesn’t write the error to the command’s standard error output, but to the current `tty` terminal. As a result, due to the mechanism used by the Python script library for calling these commands, the script library fails to capture this text, leaving you with an empty error message and a confused look. (Mind you, even if it were printed, the error message itself isn’t that clear: ‘`Bus Error (core dumped)`’)

I’m trying to fix this so that the script can give a more informative error; but for now, if “Output of failed command” is empty, there’s a good chance that you’ve run out of memory.

Rob

---

_[View the full topic](https://community.mrtrix.org/t/error-response-function/393)._
