[Edu-sig] Re: [Grail-interest] Help: TypeError: append requires exactly 1 argument; 2 given

Denis spirou@carolo.com
Wed, 7 Feb 2001 19:23:59 +0100


Le Tue, Feb 06, 2001 at 04:53:51PM -0500, A C pianota:
> looked at the mailing list and tryed the solution and
> I still have the same error
> 
> File "C:\Python\grail-0.6\Stylesheet.py", line 45, in load
>     massaged.append(((g, c), v % fparms_dict))
> TypeError: append requires exactly 1 argument; 2 given
> 
> Just want to use Grail!!

I can understand, I would love to see Grail's development
go on, if not to compete with Mozilla, at least as a 
wonderful tool on intranets and specially for educational
purpose (that's why I crossposted on edu-sig).

I don't know Grail's code. But I've looked at your problem
since this list is deader than a pork.


I run Grail on a Linux machine, with Python 1.5.2 and it
just goes right. In my Grail's version (0.6), I had the
old bad :

    list.append((x, y), z) 

code. I changed it for the following lines :

    # Map the selected font and size onto the fonts group:
    fonts = self.prefs.GetGroup('styles-fonts')
    massaged = []
    for ((g, c), v) in fonts:
        massaged.append(((g, c), v % fparms_dict))
    self.dictify_group(massaged)

that is :

    list.append(((x, y), z))

and (of course) Grail restarted just fine. If you see a
diff between your and my version, tell me !

It should be a unique tuple argument composed of a tuple
and a string. I can't see how Python keeps complaining.
(I definitely should have a deeper look at Python 2)

The only good advice I can give you : install Debian ;-)

Trying to help,
-- 
Denis FRERE
P3B    : Club Free-Pytho-Linuxien Caroloregien http://www.p3b.org
Aragne : Internet - Reseaux - Formations  http://www.aragne.com