sagemath help() 'modules' is tripped up by xml from other packages (gnustep)

Bug #373875 reported by GaryW
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sagemath (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: sagemath

In short typing help() then 'modules' seems to set sagemath off trying to work through all the files in
/usr/share/xml in a parsing attempt. The parsing fails when it hits a .dtd provided by the package gnustep.

In particular parsing stops at: /usr/share/xml/gnustep/gsdoc-1_0_0.dtd

I do not know enough about the interaction between sagemath, python, and other package xml (gnustep) to know where the problem might be, so I assign it to sagemath in the first instance.

PS Many thanks to Ubuntu packaging people for making sagemath available in Jaunty - it is a truly excellent way of accessing several free mathematical packages in a consistent (and great) language - python.

d183z2g:~$ sage
----------------------------------------------------------------------
| SAGE Version 3.0.5, Release Date: 2008-07-11 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------

sage: help()

Welcome to Python 2.5! This is the online help utility.

If this is your first time using Python, you should definitely check out
the tutorial on the Internet at http://www.python.org/doc/tut/.

Enter the name of any module, keyword, or topic to get help on writing
Python programs and using Python modules. To quit this help utility and
return to the interpreter, just type "quit".

To get a list of available modules, keywords, or topics, type "modules",
"keywords", or "topics". Each module also comes with a one-line summary
of what it does; to list the modules whose summaries contain a given word
such as "spam", type "modules spam".

help> modules

Please wait a moment while I gather a list of all available modules...

---------------------------------------------------------------------------
SAXParseException Traceback (most recent call last)

/home/useri/<ipython console> in <module>()

/usr/lib/python2.5/site.pyc in __call__(self, *args, **kwds)
    340 def __call__(self, *args, **kwds):
    341 import pydoc
--> 342 return pydoc.help(*args, **kwds)
    343
    344 def sethelper():

/usr/lib/python2.5/pydoc.pyc in __call__(self, request)
   1648 else:
   1649 self.intro()
-> 1650 self.interact()
   1651 self.output.write('''
   1652 You are now leaving help and returning to the Python interpreter.

/usr/lib/python2.5/pydoc.pyc in interact(self)
   1666 request = strip(replace(request, '"', '', "'", ''))
   1667 if lower(request) in ('q', 'quit'): break
-> 1668 self.help(request)
   1669
   1670 def getline(self, prompt):

/usr/lib/python2.5/pydoc.pyc in help(self, request)
   1682 elif request == 'keywords': self.listkeywords()
   1683 elif request == 'topics': self.listtopics()
-> 1684 elif request == 'modules': self.listmodules()
   1685 elif request[:8] == 'modules ':
   1686 self.listmodules(split(request)[1])

/usr/lib/python2.5/pydoc.pyc in listmodules(self, key)
   1803 if find(modname, '.') < 0:
   1804 modules[modname] = 1
-> 1805 ModuleScanner().run(callback)
   1806 self.list(modules.keys())
   1807 self.output.write('''

/usr/lib/python2.5/pydoc.pyc in run(self, callback, key, completer)
   1854 callback(None, modname, desc)
   1855
-> 1856 for importer, modname, ispkg in pkgutil.walk_packages():
   1857 if self.quit:
   1858 break

/usr/lib/python2.5/pkgutil.pyc in walk_packages(path, prefix, onerror)
    123 path = [p for p in path if not seen(p)]
    124
--> 125 for item in walk_packages(path, name+'.', onerror):
    126 yield item
    127

/usr/lib/python2.5/pkgutil.pyc in walk_packages(path, prefix, onerror)
    123 path = [p for p in path if not seen(p)]
    124
--> 125 for item in walk_packages(path, name+'.', onerror):
    126 yield item
    127

/usr/lib/python2.5/pkgutil.pyc in walk_packages(path, prefix, onerror)
    108 if ispkg:
    109 try:
--> 110 __import__(name)
    111 except ImportError:
    112 if onerror is not None:

/usr/lib/python2.5/site-packages/Ft/Xml/XPath/__init__.py in <module>()
    113 import Context
    114
--> 115 from Util import Evaluate, SimpleEvaluate, Compile
    116
    117 #Allow access to the NormalizeNode function

/usr/lib/python2.5/site-packages/Ft/Xml/XPath/Util.py in <module>()
     13
     14 from Ft.Xml import EMPTY_NAMESPACE
---> 15 from Ft.Xml.Domlette import GetAllNs
     16 from Ft.Xml.Lib.XmlString import SplitQName
     17

/usr/lib/python2.5/site-packages/Ft/Xml/Domlette.py in <module>()
     27
     28 from Ft.Xml import READ_EXTERNAL_DTD
---> 29 from Ft.Xml import InputSource
     30
     31 from Lib.Print import Print, PrettyPrint, CanonicalPrint

/usr/lib/python2.5/site-packages/Ft/Xml/InputSource.py in <module>()
    351
    352 NoCatalogFactory = InputSourceFactory(catalog=None)
    353
    354 from Ft.Xml.Catalog import GetDefaultCatalog
--> 355 DefaultFactory = InputSourceFactory(catalog=GetDefaultCatalog())

/usr/lib/python2.5/site-packages/Ft/Xml/Catalog.pyc in GetDefaultCatalog(basename)
    577 sys.stderr.write('Creating catalog from %s\n' % uri)
    578 sys.stderr.flush()
--> 579 catalog = Catalog(uri, quiet)
    580 else:
    581 if not quiet:

/usr/lib/python2.5/site-packages/Ft/Xml/Catalog.pyc in __init__(self, uri, quiet)
     93 if IsXml(data):
     94 # cannot be a TR 9401 document, assume an XML Catalog
---> 95 self._parseXmlCat(data)
     96 else:
     97 # cannot be an XML Catalog, assume a TR 9401 file

/usr/lib/python2.5/site-packages/Ft/Xml/Catalog.pyc in _parseXmlCat(self, data)
    375 'http://xml.org/sax/features/external-parameter-entities', False)
    376 p.setContentHandler(self)
--> 377 p.parse(source)
    378
    379 # are these explicit dels needed?

/usr/lib/python2.5/site-packages/Ft/Xml/Catalog.pyc in startElementNS(self, (namespace, name), qualifiedName, attrs)
    474 startString = attrs[(None, 'publicIdStartString')]
    475 catalog = Uri.Absolutize(attrs[(None, 'catalog')], base)
--> 476 delegate = Catalog(catalog, self.quiet)
    477 delegateRule = (len(startString), startString, delegate,
    478 self.prefer_public[-1])

/usr/lib/python2.5/site-packages/Ft/Xml/Catalog.pyc in __init__(self, uri, quiet)
     93 if IsXml(data):
     94 # cannot be a TR 9401 document, assume an XML Catalog
---> 95 self._parseXmlCat(data)
     96 else:
     97 # cannot be an XML Catalog, assume a TR 9401 file

/usr/lib/python2.5/site-packages/Ft/Xml/Catalog.pyc in _parseXmlCat(self, data)
    375 'http://xml.org/sax/features/external-parameter-entities', False)
    376 p.setContentHandler(self)
--> 377 p.parse(source)
    378
    379 # are these explicit dels needed?

/usr/lib/python2.5/site-packages/Ft/Xml/Catalog.pyc in startElementNS(self, (namespace, name), qualifiedName, attrs)
    474 startString = attrs[(None, 'publicIdStartString')]
    475 catalog = Uri.Absolutize(attrs[(None, 'catalog')], base)
--> 476 delegate = Catalog(catalog, self.quiet)
    477 delegateRule = (len(startString), startString, delegate,
    478 self.prefer_public[-1])

/usr/lib/python2.5/site-packages/Ft/Xml/Catalog.pyc in __init__(self, uri, quiet)
     93 if IsXml(data):
     94 # cannot be a TR 9401 document, assume an XML Catalog
---> 95 self._parseXmlCat(data)
     96 else:
     97 # cannot be an XML Catalog, assume a TR 9401 file

/usr/lib/python2.5/site-packages/Ft/Xml/Catalog.pyc in _parseXmlCat(self, data)
    375 'http://xml.org/sax/features/external-parameter-entities', False)
    376 p.setContentHandler(self)
--> 377 p.parse(source)
    378
    379 # are these explicit dels needed?

SAXParseException: file:///usr/share/xml/gnustep/gsdoc-1_0_0.dtd:41:0: syntax error
sage:

d183z2g:/usr/share/xml/gnustep$ cat /etc/*release*;uname -a;date;ls -l /usr/share/xml/gnustep/*.dtd;dpkg -l | grep gnustep
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.04
DISTRIB_CODENAME=jaunty
DISTRIB_DESCRIPTION="Ubuntu 9.04"
Linux d183z2g 2.6.27-11-generic #1 SMP Wed Apr 1 20:57:48 UTC 2009 i686 GNU/Linux
Fri May 8 20:52:01 BST 2009
-rw-r--r-- 1 root root 10307 2008-11-07 14:13 /usr/share/xml/gnustep/gsdoc-0_6_5.dtd
-rw-r--r-- 1 root root 14262 2008-11-07 14:13 /usr/share/xml/gnustep/gsdoc-0_6_6.dtd
-rw-r--r-- 1 root root 14319 2008-11-07 14:13 /usr/share/xml/gnustep/gsdoc-0_6_7.dtd
-rw-r--r-- 1 root root 14346 2008-11-07 14:13 /usr/share/xml/gnustep/gsdoc-1_0_0.dtd
-rw-r--r-- 1 root root 14417 2008-11-07 14:13 /usr/share/xml/gnustep/gsdoc-1_0_1.dtd
-rw-r--r-- 1 root root 15793 2008-11-07 14:13 /usr/share/xml/gnustep/gsdoc-1_0_2.dtd
-rw-r--r-- 1 root root 15799 2008-11-07 14:13 /usr/share/xml/gnustep/gsdoc-1_0_3.dtd
-rw-r--r-- 1 root root 2152 2008-11-07 14:13 /usr/share/xml/gnustep/plist-0_9.dtd
ii gnustep 7.3 The GNUstep Development Environment -- user applic
ii gnustep-back-common 0.14.0-2build1 The GNUstep GUI Backend - common files
ii gnustep-back0.14 0.14.0-2build1 The GNUstep GUI Backend
ii gnustep-back0.14-art 0.14.0-2build1 The GNUstep GUI Backend
ii gnustep-base-common 1.16.3-3ubuntu1 GNUstep Base library - common files
ii gnustep-base-runtime 1.16.3-3ubuntu1 GNUstep Base library
ii gnustep-common 2.0.6-2 Common files for the core GNUstep environment
ii gnustep-examples 1:1.2.0-2build1 GNUstep Example Applications
ii gnustep-gpbs 0.14.0-2build1 The GNUstep PasteBoard Server
ii gnustep-gui-common 0.14.0-4ubuntu1 GNUstep GUI Library - common files
ii gnustep-gui-runtime 0.14.0-4ubuntu1 GNUstep GUI Library - runtime files
ii gnustep-icons 1.0-4 Several free icons for use with GNUstep and others
rc libgnustep-base1.13 1.13.0-7 GNUstep Base library
ii libgnustep-base1.16 1.16.3-3ubuntu1 GNUstep Base library
rc libgnustep-gui0.11 0.11.0-2 GNUstep GUI Library

useri@d183z2g:~$ grep gsdoc-1_0_0.dtd /var/lib/dpkg/info/*gnustep*.list
/var/lib/dpkg/info/gnustep-base-common.list:/usr/share/xml/gnustep/gsdoc-1_0_0.dtd
ii libgnustep-gui0.14 0.14.0-4ubuntu1 GNUstep GUI Library

Tim Abbott (tabbott)
Changed in sagemath (Ubuntu):
status: New → Confirmed
Changed in sagemath (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.