Ask Your Question
1

maple interface RuntimeError

asked 2011-11-16 08:11:14 -0500

joaomfranco gravatar image

I have ubuntu linux with sage and maple13 for linux instaled. maple.console, maple.interact and %maple work but not maple(...) (maple.<tab> OK): sage: maple('2+2') 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/joao/<ipython console=""> in <module>()

/usr/local/share/sage/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

/usr/local/share/sage/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:

/usr/local/share/sage/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:

/usr/local/share/sage/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):

/usr/local/share/sage/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):

/usr/local/share/sage/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):

/usr/local/share/sage/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

/usr/local/share/sage/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)

/usr/local/share/sage/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:

/usr/local/share/sage/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/joao ...

(more)
edit retag flag offensive close merge delete

Comments

I have the same problem with OSX 10.7.4, Sage 5.0 maple.eval('2*3') ... RuntimeError: Maple terminated unexpectedly while reading in a large line: An error occurred running a Maple command: INPUT: read "/Users/jarvis/.sage//temp/flute/32311//interface//tmp36019"; OUTPUT: on line 2, unexpected end of input Error, while reading `/Users/jarvis/.sage//temp/flute/32311//interface//tmp36019`

Tyler Jarvis gravatar imageTyler Jarvis ( 2012-06-05 18:25:00 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2011-11-30 21:56:39 -0500

lftabera gravatar image

It seems that there is a new error in recent versions of sage and/or maple.

As a workaround until this is fixed, for short commands, you can use:

maple.eval('2+2;')

'4'

But the answer is a string, not a maple object.

edit flag offensive delete link more

Comments

Unfortunately this workaround doesn't work for me.

Tyler Jarvis gravatar imageTyler Jarvis ( 2012-06-05 18:28:46 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-11-16 08:11:14 -0500

Seen: 280 times

Last updated: Nov 30 '11