Error 'EOF in multi-line string'

57 views
Skip to first unread message

Robert Pollak

unread,
Jun 11, 2015, 12:03:57 AM6/11/15
to sy...@googlegroups.com
Hello,

as a SymPy newbie, do I do something wrong here?

In [1]: solve([x**2 * y**2 <= x**2 * y, x**2 * y**2 > x**2 * y])
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line string', (1, 38))


---------------------------------------------------------------------------
NotImplementedError Traceback (most recent
call last)
<ipython-input-1-b161ed4023a1> in <module>()
----> 1 solve([x**2 * y**2 <= x**2 * y, x**2 * y**2 > x**2 * y])

/home/robert/bin/sympy/sympy/solvers/solvers.pyc in solve(f,
*symbols, **flags)
811 f[i] = fi.as_expr()
812 elif isinstance(fi, (bool, BooleanAtom)) or
fi.is_Relational:
--> 813 return reduce_inequalities(f, symbols=symbols)
814
815 # rewrite hyperbolics in terms of exp

/home/robert/bin/sympy/sympy/solvers/inequalities.pyc in
reduce_inequalities(inequalities, symbols)
587
588 # solve system
--> 589 rv = _reduce_inequalities(inequalities, symbols)
590
591 # restore original symbols and return

/home/robert/bin/sympy/sympy/solvers/inequalities.pyc in
_reduce_inequalities(inequalities, symbols)
512 raise NotImplementedError(filldedent('''
513 inequality has more than one
--> 514 symbol of interest'''))
515
516 if expr.is_polynomial(gen):

NotImplementedError:
inequality has more than one symbol of interest


I am using the current Git head (commit b7c9ba).
(Question context: http://trac.sagemath.org/ticket/14229)

Best regards,
Robert

Joachim Durchholz

unread,
Jun 11, 2015, 2:53:46 AM6/11/15
to sy...@googlegroups.com
Am 06.06.2015 um 20:37 schrieb Robert Pollak:
> as a SymPy newbie, do I do something wrong here?
>
> In [1]: solve([x**2 * y**2 <= x**2 * y, x**2 * y**2 > x**2 * y])

I can't see anything wrong with that.

I'm not sure what that "unexpected error" thing is and why there's any
tokenization anywhere. I'm getting this in current master:

>>> solve([x**2 * y**2 <= x**2 * y, x**2 * y**2 > x**2 * y])
Traceback (most recent call last):
File "<console>", line 1, in <module>
File
"/home/jo/Projekte/sympy-workspace/sympy-project/sympy/sympy/solvers/solvers.py",
line 813, in solve
return reduce_inequalities(f, symbols=symbols)
File
"/home/jo/Projekte/sympy-workspace/sympy-project/sympy/sympy/solvers/inequalities.py",
line 589, in reduce_inequalities
rv = _reduce_inequalities(inequalities, symbols)
File
"/home/jo/Projekte/sympy-workspace/sympy-project/sympy/sympy/solvers/inequalities.py",
line 514, in _reduce_inequalities
symbol of interest'''))
NotImplementedError:
inequality has more than one symbol of interest

This seems to be (not) working as expected I'd say, SymPy is telling us
that inequalities on more than one variable are not implemented currently.
Reply all
Reply to author
Forward
0 new messages