[Tutor] Help in debugging some Python code.

trevor.newton@bt.com trevor.newton@bt.com
Wed, 10 Jul 2002 11:37:30 +0100


Chaps,

I was wondering if any of you could suggest a strategy for solving a small
problem that I have with a DNS utility that I downloaded from
http://www.interlink.com.au/anthony/python/dns.tar.gz after following a link
from the Vaults site. This utility comes with a number of small test
programs, but when I run them they report the following :

Traceback (most recent call last):
  File "test.py", line 12, in ?
    a=r.req()
  File "/usr/local/lib/python2.2/site-packages/DNS/Base.py", line 148, in
req
    m.addQuestion(qname, qtype, DNS.Class.IN)
  File "/usr/local/lib/python2.2/site-packages/DNS/Lib.py", line 427, in
addQuestion
    self.addname(qname)
  File "/usr/local/lib/python2.2/site-packages/DNS/Lib.py", line 105, in
addname
    index.append(keys[j], offset + len(buf))
TypeError: append() takes exactly one argument (2 given)

Now I suspect that this utility was written for a previous version of
Python, I'm using version 2.2 as you can see. I also suspect that the
reported error is not the root of the problem but being inexperienced I
don't know where to start looking for a solution. Any suggestions.

Regards,

            Trevor.