TypeError: sort() takes no keyword arguments

Hi all,

I have installed matplotlib via svn on Centos (x86-64 python2.3). If I try to import pylab I get

Python 2.3.4 (#1, May 2 2007, 19:18:17)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

from pylab import plot, show

Traceback (most recent call last):
   File "<stdin>", line 1, in ?
   File "/data/home/nwagner/local/lib64/python2.3/site-packages/matplotlib-0.90.1-py2.3-linux-x86_64.egg/pylab.py", line 1, in ?
     from matplotlib.pylab import *
   File "/data/home/nwagner/local/lib64/python2.3/site-packages/matplotlib-0.90.1-py2.3-linux-x86_64.egg/matplotlib/__init__.py", line 94, in ?
     from rcsetup import defaultParams, validate_backend, validate_toolbar
   File "/data/home/nwagner/local/lib64/python2.3/site-packages/matplotlib-0.90.1-py2.3-linux-x86_64.egg/matplotlib/rcsetup.py", line 12, in ?
     from matplotlib.fontconfig_pattern import parse_fontconfig_pattern
   File "/data/home/nwagner/local/lib64/python2.3/site-packages/matplotlib-0.90.1-py2.3-linux-x86_64.egg/matplotlib/fontconfig_pattern.py", line 21, in ?
     from matplotlib.pyparsing import Literal, OneOrMore, ZeroOrMore, Optional, Regex, \
   File "/data/home/nwagner/local/lib64/python2.3/site-packages/matplotlib-0.90.1-py2.3-linux-x86_64.egg/matplotlib/pyparsing.py", line 3151, in ?
     commonHTMLEntity = Combine("&" + oneOf("gt lt amp nbsp quot").setResultsName("entity") +";")
   File "/data/home/nwagner/local/lib64/python2.3/site-packages/matplotlib-0.90.1-py2.3-linux-x86_64.egg/matplotlib/pyparsing.py", line 2849, in oneOf
     symbols.sort(reverse=True)
TypeError: sort() takes no keyword arguments

Any pointer would be appreciated.

Nils

Sorry -- I accidentally used a feature only available in Python 2.4 and above.

I have added a fix in SVN r4402. Since I don't have a Python2.3 to test with, can you please let me know if that fixes your problem?

Cheers,
Mike

Nils Wagner wrote:

···

Hi all,

I have installed matplotlib via svn on Centos (x86-64 python2.3). If I try to import pylab I get

Python 2.3.4 (#1, May 2 2007, 19:18:17)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

from pylab import plot, show

Traceback (most recent call last):
   File "<stdin>", line 1, in ?
   File "/data/home/nwagner/local/lib64/python2.3/site-packages/matplotlib-0.90.1-py2.3-linux-x86_64.egg/pylab.py", line 1, in ?
     from matplotlib.pylab import *
   File "/data/home/nwagner/local/lib64/python2.3/site-packages/matplotlib-0.90.1-py2.3-linux-x86_64.egg/matplotlib/__init__.py", line 94, in ?
     from rcsetup import defaultParams, validate_backend, validate_toolbar
   File "/data/home/nwagner/local/lib64/python2.3/site-packages/matplotlib-0.90.1-py2.3-linux-x86_64.egg/matplotlib/rcsetup.py", line 12, in ?
     from matplotlib.fontconfig_pattern import parse_fontconfig_pattern
   File "/data/home/nwagner/local/lib64/python2.3/site-packages/matplotlib-0.90.1-py2.3-linux-x86_64.egg/matplotlib/fontconfig_pattern.py", line 21, in ?
     from matplotlib.pyparsing import Literal, OneOrMore, ZeroOrMore, Optional, Regex, \
   File "/data/home/nwagner/local/lib64/python2.3/site-packages/matplotlib-0.90.1-py2.3-linux-x86_64.egg/matplotlib/pyparsing.py", line 3151, in ?
     commonHTMLEntity = Combine("&" + oneOf("gt lt amp nbsp quot").setResultsName("entity") +";")
   File "/data/home/nwagner/local/lib64/python2.3/site-packages/matplotlib-0.90.1-py2.3-linux-x86_64.egg/matplotlib/pyparsing.py", line 2849, in oneOf
     symbols.sort(reverse=True)
TypeError: sort() takes no keyword arguments

Any pointer would be appreciated.

Nils

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
matplotlib-devel List Signup and Options

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA