Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 1311 by mussadique: Integrals break print_mathml
http://code.google.com/p/sympy/issues/detail?id=1311

using sympy version 0.6.3,

y=Integral(x/(x**2+2*x+1),x)
print_mathml(y)

I will get this error:

========================================CODE

In [6]: print_gtk(y)
---------------------------------------------------------------------------
exceptions.AttributeError                            Traceback (most recent
call last)

/media/MMC-SD/partition1/<ipython console>

/usr/lib/python2.4/site-packages/sympy/printing/gtk.py in print_gtk(x,
start_viewer)
      11     tmp = tempfile.mktemp() # create a temp file to store the result
      12     file = open(tmp, 'wb')
---> 13     file.write( c2p(mathml(x), simple=True) )
      14     file.close()
      15

/usr/lib/python2.4/site-packages/sympy/printing/mathml.py in mathml(expr)
     136     """Returns the MathML representation of expr"""
     137     s = MathMLPrinter()
--> 138     return s.doprint(sympify(expr))
     139
     140 def print_mathml(expr):

/usr/lib/python2.4/site-packages/sympy/printing/mathml.py in doprint(self,  
e)
      15
      16     def doprint(self, e):
---> 17         return self._print(e).toprettyxml()
      18
      19     def mathml_tag(self, e):

/usr/lib/python2.4/site-packages/sympy/printing/printer.py in _print(self,
expr, *args)
     141             printmethod = '_print_' + cls.__name__
     142             if hasattr(self, printmethod):
--> 143                 res = getattr(self, printmethod)(expr, *args)
     144                 if res is None:
     145                     raise Exception("Printing method '%s' did
return None" % printmethod)

/usr/lib/python2.4/site-packages/sympy/printing/mathml.py in
_print_Integral(self, e)
      78         x.appendChild(x_2)
      79         x.appendChild(x_3)
---> 80         x.appendChild(self._print(e.f))
      81
      82         return x

AttributeError: 'Integral' object has no attribute 'f'


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to