Problems using Grail.

Grant Edwards grante at visi.com
Wed Feb 21 18:51:54 EST 2001


In article <3A943B33.CD618A9B at olen.to>, Joonas Paalasmaa wrote:

>When I tried to start Grail by typing "python grail-0.6\grail.py"
>Python gave the following error message.
>Python version is 1.6 and platform is Windows95.
>What could be the problem?
>
>- Joonas
>
>Traceback (innermost last):
>  File "C:\Python16\grail-0.6\grail.py", line 499, in ?
>    main()
>  File "C:\Python16\grail-0.6\grail.py", line 108, in main
>    app = Application(prefs=prefs, display=display)
>  File "C:\Python16\grail-0.6\grail.py", line 248, in __init__
>    self.stylesheet = Stylesheet.Stylesheet(self.prefs)
>  File "C:\Python16\grail-0.6\Stylesheet.py", line 21, in __init__
>    self.load()
>  File "C:\Python16\grail-0.6\Stylesheet.py", line 45, in load
>    massaged.append((g, c), v % fparms_dict)
>TypeError: append requires exactly 1 argument; 2 given

Grail is pretty old, and there have been language changes in 1.6 and later
that are causing problems.  The append() method for lists has changed:

1.5.2:

>>> print x
[1, 2, 3, 4]
>>> x.append(5,6,7)
>>> print x
[1, 2, 3, 4, (5, 6, 7)]

Newsgroups: comp.lang.python  
Subject: Re: Problems using Grail.  
References: <3A943B33.CD618A9B at olen.to>  
Organization: Vector Internet Services, Inc.  
Followup-To:  
  
In article <3A943B33.CD618A9B at olen.to>, Joonas Paalasmaa wrote:  
  
>When I tried to start Grail by typing "python grail-0.6\grail.py"  
>Python gave the following error message.  
>Python version is 1.6 and platform is Windows95.  
>What could be the problem?  
>  
>- Joonas  
>  
>Traceback (innermost last):  
>  File "C:\Python16\grail-0.6\grail.py", line 499, in ?  
>    main()  
>  File "C:\Python16\grail-0.6\grail.py", line 108, in main  
>    app = Application(prefs=prefs, display=display)  
>  File "C:\Python16\grail-0.6\grail.py", line 248, in __init__  
>    self.stylesheet = Stylesheet.Stylesheet(self.prefs)  
>  File "C:\Python16\grail-0.6\Stylesheet.py", line 21, in __init__  
>    self.load()  
>  File "C:\Python16\grail-0.6\Stylesheet.py", line 45, in load  
>    massaged.append((g, c), v % fparms_dict)  
>TypeError: append requires exactly 1 argument; 2 given  
  
Grail is pretty old, and there have been language changes in 1.6 and later
that are causing problems. (I never got Grail to run under 1.5.2 either.)

In your example, it's the append() method for lists has changed:
  
Python 1.5.2:

>>> print x
[1, 2, 3, 4]
>>> x.append(5,6,7)
>>> print x
[1, 2, 3, 4, (5, 6, 7)]

python 2.0

>>> print x
[1, 2, 3, 4]
>>> x.append(5,6,7)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: append requires exactly 1 argument; 3 given

>>> x.append((5,6,7))
>>> print x
[1, 2, 3, 4, (5, 6, 7)]

-- 
Grant Edwards                   grante             Yow!  ... I want a COLOR
                                  at               T.V. and a VIBRATING BED!!!
                               visi.com            



More information about the Python-list mailing list