title: Oct2PyError occurs in ipython when octavemagic is used
body: <p>I want to use octave functionality from ipython.
  Therefore,I installed oct2py module by pip command.
  (To be precise, I'm using ipython3 and pip3 command)</p>
  
  <p>The installation itself was done successfully.
  According to <a href="http://nbviewer.ipython.org/github/ipython/ipython/blob/d835d46dcc50043971b4a9915398bad1b5d63648/docs/examples/notebooks/octavemagic_extension.ipynb" rel="nofollow">this web page</a>, I tried following commands in ipython terminal mode.</p>
  
  <pre><code>In [1]: %load_ext octavemagic 
  </code></pre>
  
  <p>--> %octave becomes available apparently.</p>
  
  <pre><code>In [2]: x = %octave [1 2; 3 4];x
  </code></pre>
  
  <p>--> ipython  said following error message.</p>
  
  <p>How can I use octavemagic without Oct2PyError?
  Any help would be appreciated. Thanks in advance.</p>
  
  <pre><code>------------------------------------------------------------------    ---------
  AttributeError                            Traceback (most recent call last)
  &lt;ipython-input-3-d604e29afc22&gt; in &lt;module&gt;()
  ----&gt; 1 x = get_ipython().magic('octave [1 2; 3 4];')
  
  /usr/local/lib/python3.4/dist-packages/IPython/core/interactiveshell.py in magic(self, arg_s)
     2203         magic_name, _, magic_arg_s = arg_s.partition(' ')
     2204         magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
  -&gt; 2205         return self.run_line_magic(magic_name, magic_arg_s)
     2206 
     2207     #-------------------------------------------------------------------------
  
  /usr/local/lib/python3.4/dist-packages/IPython/core/interactiveshell.py in run_line_magic(self, magic_name, line)
     2124                 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
     2125             with self.builtin_trap:
  -&gt; 2126                 result = fn(*args,**kwargs)
     2127             return result
     2128 
  
  /usr/local/lib/python3.4/dist-packages/IPython/extensions/octavemagic.py in octave(self, line, cell, local_ns)
  
  /usr/local/lib/python3.4/dist-packages/IPython/core/magic.py in &lt;lambda&gt;(f, *a, **k)
      191     # but it's overkill for just that one bit of state.
      192     def magic_deco(arg):
  --&gt; 193         call = lambda f, *a, **k: f(*a, **k)
      194 
      195         if callable(arg):
  
  /usr/local/lib/python3.4/dist-packages/IPython/extensions/octavemagic.py in octave(self, line, cell, local_ns)
      326             text_output = self._oct.run(code, verbose=False)
      327         except (oct2py.Oct2PyError) as exception:
  --&gt; 328             msg = exception.message
      329             msg = msg.split('# ___&lt;end_pre_call&gt;___ #')[1]
      330             msg = msg.split('# ___&lt;start_post_call&gt;___ #')[0]
  
  AttributeError: 'Oct2PyError' object has no attribute 'message'
  </code></pre>
  
  <p><strong>Environment and Software Version</strong></p>
  
  <ul>
  <li><p>OS: Ubuntu 14.04LTS (64bit)</p></li>
  <li><p>python : 3.4.0</p></li>
  <li><p>ipython: 2.3.0</p></li>
  <li><p>oct2py : 2.4.0</p></li>
  <li><p>numpy  : 1.9.0</p></li>
  <li><p>octave : 3.8.1</p></li>
  </ul>