Menu

#3 Error on running: bad syntax

open
nobody
None
5
2002-01-17
2002-01-17
Anonymous
No

Traceback (most recent call last):
File "C:\WINDOWS\Desktop\grail-0.6\grail-0.6
\grail.py", line 499, in ?
main()
File "C:\WINDOWS\Desktop\grail-0.6\grail-0.6
\grail.py", line 108, in main
app = Application(prefs=prefs, display=display)
File "C:\WINDOWS\Desktop\grail-0.6\grail-0.6
\grail.py", line 248, in __init__
self.stylesheet = Stylesheet.Stylesheet(self.prefs)
File "C:\WINDOWS\Desktop\grail-0.6\grail-0.6
\Stylesheet.py", line 21, in __init__
self.load()
File "C:\WINDOWS\Desktop\grail-0.6\grail-0.6
\Stylesheet.py", line 45, in load
massaged.append((g, c), v % fparms_dict)
TypeError: append() takes exactly one argument (2
given)

I don't know how to fix it, though I have tried
everything I could think of (the again, I have been
doing python coding for about 2 hours now...).

Discussion

  • Nobody/Anonymous

    Logged In: NO

    i got the same problem on a red hat 7.2 2.4.7 kernel box -
    what to do?
    it seems that someone forgot to write a couple of arguments

    :-*

    tropiko

     
  • Graham Horler

    Graham Horler - 2002-08-02

    Logged In: YES
    user_id=543663

    You must be running python2.0 or newer.
    Python1.5 accepted more than one argument to a
    list.append(), joining them into a tuple.
    Python2.0 onwards fixes this bug and requires one argument
    to list.append.
    The fix is to replace line 45 of Stylesheet.py with:
    massaged.append(((g, c), v % fparms_dict))

    Happy Coding.

     
  • R

    R - 2009-03-05

    Put [] around the two arguments passed to append so as to pass in a list with two entries.

     

Log in to post a comment.