#12295: maple interface broken
----------------------------------+--------------------------
Reporter: sluther | Owner: was
Type: defect | Status: needs_info
Priority: major | Milestone: sage-6.2
Component: interfaces | Resolution:
Keywords: | Merged in:
Authors: J Miguel Farto | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
----------------------------------+--------------------------
Description changed by mmezzarobba:
Old description:
> {{{
> With sage-4.7 (and maple 14) it works:
> ----------------------------------------------------------------------
> | Sage Version 4.7, Release Date: 2011-05-23 |
> | Type notebook() for the GUI, and license() for information. |
> ----------------------------------------------------------------------
> sage: maple('1+1')
> 2
> sage:
>
> But with 4.7.2 all maple commands end in this traceback:
>
> ----------------------------------------------------------------------
> | Sage Version 4.7.2, Release Date: 2011-10-29 |
> | Type notebook() for the GUI, and license() for information. |
> ----------------------------------------------------------------------
> sage: maple('1+1')
> ERROR: An unexpected error occurred while tokenizing input
> The following traceback may be corrupted or invalid
> The error message is: ('EOF in multi-line statement', (17, 0))
>
> ---------------------------------------------------------------------------
> RuntimeError Traceback (most recent call
> last)
>
> /home/luther/<ipython console> in <module>()
>
> /home/luther/sage-4.7.2-linux-64bit-ubuntu_10.04.3_lts-
> x86_64-Linux/local/lib/python2.6/site-packages/IPython/Prompts.pyc in
> __call__(self, arg)
> 550
> 551 # and now call a possibly user-defined print
> mechanism
> --> 552 manipulated_val = self.display(arg)
> 553
> 554 # user display hooks can change the variable to be
> stored in
>
> /home/luther/sage-4.7.2-linux-64bit-ubuntu_10.04.3_lts-
> x86_64-Linux/local/lib/python2.6/site-packages/IPython/Prompts.pyc in
> _display(self, arg)
> 576 return IPython.generics.result_display(arg)
> 577 except TryNext:
> --> 578 return self.shell.hooks.result_display(arg)
> 579
> 580 # Assign the default display method:
>
> /home/luther/sage-4.7.2-linux-64bit-ubuntu_10.04.3_lts-
> x86_64-Linux/local/lib/python2.6/site-packages/IPython/hooks.pyc in
> __call__(self, *args, **kw)
> 139 #print "prio",prio,"cmd",cmd #dbg
> 140 try:
> --> 141 ret = cmd(*args, **kw)
> 142 return ret
> 143 except ipapi.TryNext, exc:
>
> /home/luther/sage-4.7.2-linux-64bit-ubuntu_10.04.3_lts-
> x86_64-Linux/local/lib/python2.6/site-packages/sage/misc/displayhook.pyc
> in result_display(ip_self, obj)
> 148 # IPython's default result_display() uses the
> IPython.genutils.Term.cout stream.
> 149 # See also local/lib/python2.6/site-
> packages/IPython/hooks.py.
> --> 150 print_obj(IPython.genutils.Term.cout, obj)
> 151
> 152 def displayhook(obj):
>
> /home/luther/sage-4.7.2-linux-64bit-ubuntu_10.04.3_lts-
> x86_64-Linux/local/lib/python2.6/site-packages/sage/misc/displayhook.pyc
> in print_obj(out_stream, obj)
> 140 if _check_tall_list_and_print(out_stream, obj):
> 141 return
> --> 142 print >>out_stream, `obj`
> 143
> 144 def result_display(ip_self, obj):
>
> /home/luther/sage-4.7.2-linux-64bit-ubuntu_10.04.3_lts-
> x86_64-Linux/local/lib/python2.6/site-packages/sage/interfaces/maple.pyc
> in __repr__(self)
> 1056 """
> 1057 self._check_valid()
> -> 1058 return self.parent().get(self._name)
> 1059
> 1060 def _latex_(self):
>
> /home/luther/sage-4.7.2-linux-64bit-ubuntu_10.04.3_lts-
> x86_64-Linux/local/lib/python2.6/site-packages/sage/interfaces/maple.pyc
> in get(self, var)
> 609 '2'
> 610 """
> --> 611 s = self.eval('printf("%%q",%s)'%var)
> 612 return s
> 613
>
> /home/luther/sage-4.7.2-linux-64bit-ubuntu_10.04.3_lts-
> x86_64-Linux/local/lib/python2.6/site-packages/sage/interfaces/expect.pyc
> in eval(self, code, strip, synchronize, locals, allow_use_file,
> split_lines, **kwds)
> 1034 if (split_lines is "nofile" and allow_use_file
> and
> 1035 self._eval_using_file_cutoff and
> len(code) > self._eval_using_file_cutoff):
> -> 1036 return self._eval_line_using_file(code)
> 1037 elif split_lines:
> 1038 return '\n'.join([self._eval_line(L,
> allow_use_file=allow_use_file, **kwds)
>
> /home/luther/sage-4.7.2-linux-64bit-ubuntu_10.04.3_lts-
> x86_64-Linux/local/lib/python2.6/site-packages/sage/interfaces/expect.pyc
> in _eval_line_using_file(self, line)
> 653 tmp_to_use = self._remote_tmpfile()
> 654 try:
> --> 655 s =
> self._eval_line(self._read_in_file_command(tmp_to_use),
> allow_use_file=False)
> 656 except pexpect.EOF, msg:
> 657 if self._quit_string() in line:
>
> /home/luther/sage-4.7.2-linux-64bit-ubuntu_10.04.3_lts-
> x86_64-Linux/local/lib/python2.6/site-packages/sage/interfaces/maple.pyc
> in _eval_line(self, line, allow_use_file, wait_for_prompt)
> 559 e.expect('__sage__;')
> 560 e.expect(self._prompt)
> --> 561 raise RuntimeError, "An error occurred running a
> Maple command:\nINPUT:\n%s\nOUTPUT:\n%s"%(line, z)
> 562 return z
> 563
>
> RuntimeError: An error occurred running a Maple command:
> INPUT:
> read "/home/luther/.sage//temp/dirac/18306//interface//tmp18309";
> OUTPUT:
> on line 2, unexpected end of input
> Error, while reading
> `/home/luther/.sage//temp/dirac/18306//interface//tmp18309`
> }}}
New description:
With sage-4.7 (and maple 14) it works:
{{{
----------------------------------------------------------------------
| Sage Version 4.7, Release Date: 2011-05-23 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
sage: maple('1+1')
2
sage:
}}}
But with 4.7.2 all maple commands end in this traceback:
{{{
----------------------------------------------------------------------
| Sage Version 4.7.2, Release Date: 2011-10-29 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
sage: maple('1+1')
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (17, 0))
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call
last)
/home/luther/<ipython console> in <module>()
/home/luther/sage-4.7.2-linux-64bit-ubuntu_10.04.3_lts-
x86_64-Linux/local/lib/python2.6/site-packages/IPython/Prompts.pyc in
__call__(self, arg)
550
551 # and now call a possibly user-defined print mechanism
--> 552 manipulated_val = self.display(arg)
553
554 # user display hooks can change the variable to be
stored in
/home/luther/sage-4.7.2-linux-64bit-ubuntu_10.04.3_lts-
x86_64-Linux/local/lib/python2.6/site-packages/IPython/Prompts.pyc in
_display(self, arg)
576 return IPython.generics.result_display(arg)
577 except TryNext:
--> 578 return self.shell.hooks.result_display(arg)
579
580 # Assign the default display method:
/home/luther/sage-4.7.2-linux-64bit-ubuntu_10.04.3_lts-
x86_64-Linux/local/lib/python2.6/site-packages/IPython/hooks.pyc in
__call__(self, *args, **kw)
139 #print "prio",prio,"cmd",cmd #dbg
140 try:
--> 141 ret = cmd(*args, **kw)
142 return ret
143 except ipapi.TryNext, exc:
/home/luther/sage-4.7.2-linux-64bit-ubuntu_10.04.3_lts-
x86_64-Linux/local/lib/python2.6/site-packages/sage/misc/displayhook.pyc
in result_display(ip_self, obj)
148 # IPython's default result_display() uses the
IPython.genutils.Term.cout stream.
149 # See also local/lib/python2.6/site-packages/IPython/hooks.py.
--> 150 print_obj(IPython.genutils.Term.cout, obj)
151
152 def displayhook(obj):
/home/luther/sage-4.7.2-linux-64bit-ubuntu_10.04.3_lts-
x86_64-Linux/local/lib/python2.6/site-packages/sage/misc/displayhook.pyc
in print_obj(out_stream, obj)
140 if _check_tall_list_and_print(out_stream, obj):
141 return
--> 142 print >>out_stream, `obj`
143
144 def result_display(ip_self, obj):
/home/luther/sage-4.7.2-linux-64bit-ubuntu_10.04.3_lts-
x86_64-Linux/local/lib/python2.6/site-packages/sage/interfaces/maple.pyc
in __repr__(self)
1056 """
1057 self._check_valid()
-> 1058 return self.parent().get(self._name)
1059
1060 def _latex_(self):
/home/luther/sage-4.7.2-linux-64bit-ubuntu_10.04.3_lts-
x86_64-Linux/local/lib/python2.6/site-packages/sage/interfaces/maple.pyc
in get(self, var)
609 '2'
610 """
--> 611 s = self.eval('printf("%%q",%s)'%var)
612 return s
613
/home/luther/sage-4.7.2-linux-64bit-ubuntu_10.04.3_lts-
x86_64-Linux/local/lib/python2.6/site-packages/sage/interfaces/expect.pyc
in eval(self, code, strip, synchronize, locals, allow_use_file,
split_lines, **kwds)
1034 if (split_lines is "nofile" and allow_use_file and
1035 self._eval_using_file_cutoff and len(code)
> self._eval_using_file_cutoff):
-> 1036 return self._eval_line_using_file(code)
1037 elif split_lines:
1038 return '\n'.join([self._eval_line(L,
allow_use_file=allow_use_file, **kwds)
/home/luther/sage-4.7.2-linux-64bit-ubuntu_10.04.3_lts-
x86_64-Linux/local/lib/python2.6/site-packages/sage/interfaces/expect.pyc
in _eval_line_using_file(self, line)
653 tmp_to_use = self._remote_tmpfile()
654 try:
--> 655 s =
self._eval_line(self._read_in_file_command(tmp_to_use),
allow_use_file=False)
656 except pexpect.EOF, msg:
657 if self._quit_string() in line:
/home/luther/sage-4.7.2-linux-64bit-ubuntu_10.04.3_lts-
x86_64-Linux/local/lib/python2.6/site-packages/sage/interfaces/maple.pyc
in _eval_line(self, line, allow_use_file, wait_for_prompt)
559 e.expect('__sage__;')
560 e.expect(self._prompt)
--> 561 raise RuntimeError, "An error occurred running a
Maple command:\nINPUT:\n%s\nOUTPUT:\n%s"%(line, z)
562 return z
563
RuntimeError: An error occurred running a Maple command:
INPUT:
read "/home/luther/.sage//temp/dirac/18306//interface//tmp18309";
OUTPUT:
on line 2, unexpected end of input
Error, while reading
`/home/luther/.sage//temp/dirac/18306//interface//tmp18309`
}}}
see also #2120
--
--
Ticket URL: <http://trac.sagemath.org/ticket/12295#comment:7>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.