WeBWorK Problems

Sage interactive Cell ValueError: Rational Field: domain must be one of 'complex', 'real', 'positive' or 'integer'

Sage interactive Cell ValueError: Rational Field: domain must be one of 'complex', 'real', 'positive' or 'integer'

by Daniel An -
Number of replies: 1
In one of the problems:
Library/MC/Sage/MultiCal/template.pg
I get the following error.
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-1-2ee7a07528a9> in <module>()  5 # Example Sage Python  6  ----> 7 x = var("x",domain=QQ)  8 y = var("y",domain=QQ)  9  /home/sc_serv/sage/local/lib/python2.7/site-packages/sage/calculus/var.so in sage.calculus.var.var (/home/sc_serv/sage/src/build/cythonized/sage/calculus/var.c:1012)() /home/sc_serv/sage/local/lib/python2.7/site-packages/sage/symbolic/ring.so in sage.symbolic.ring.SymbolicRing.var (/home/sc_serv/sage/src/build/cythonized/sage/symbolic/ring.cpp:9212)() /home/sc_serv/sage/local/lib/python2.7/site-packages/sage/symbolic/ring.so in sage.symbolic.ring.SymbolicRing.var (/home/sc_serv/sage/src/build/cythonized/sage/symbolic/ring.cpp:8980)() /home/sc_serv/sage/local/lib/python2.7/site-packages/sage/symbolic/ring.so in sage.symbolic.ring.SymbolicRing.symbol (/home/sc_serv/sage/src/build/cythonized/sage/symbolic/ring.cpp:7728)() /home/sc_serv/sage/local/lib/python2.7/site-packages/sage/symbolic/ring.so in sage.symbolic.ring.sage_domain_to_ginac_domain (/home/sc_serv/sage/src/build/cythonized/sage/symbolic/ring.cpp:10110)() ValueError: Rational Field: domain must be one of 'complex', 'real', 'positive' or 'integer'



How should I fix this?

Thank you
In reply to Daniel An

Re: Sage interactive Cell ValueError: Rational Field: domain must be one of 'complex', 'real', 'positive' or 'integer'

by Daniel An -
Somehow the line breaks were ignored in my previous post.
The lines that gave errors in the problem were:
7 x = var("x",domain=QQ)
8 y = var("y",domain=QQ)

The error was:
ValueError: Rational Field: domain must be one of 'complex', 'real', 'positive' or 'integer'