Title: InterfaceError: Error binding parameter 0 - probably unsupported type
Tags: python;django
Question: i have the following:

```class Tag( models.Model ):
    name = models.CharField( max_length=64 )

class Tag2Node( models.Model ):
    ip = models.IPAddressField( db_index=True )
    tag  = models.ForeignKey( Tag )
    last_update = models.DateTimeField( auto_now=True )

class Node( models.Model ):
    id = models.CharField( primary_key=True, max_length=64 )
    ip = models.IPAddressField( db_index=True )
    method = models.CharField( max_length=64 )
```

(plus some other stuff)

basically i can't do a ForeignKey on the Node.ip as it's rows not unique (i may have may methods for the same ip).

so in order to query i do a

```found_ips = Tag2Node.objects.filter( tag__name=include ).values('ip').distinct()
q = Q( ip__exact=found_ips[0] )
nodes = Node.objects.get( q )
```

but i get the error:

```InterfaceError: Error binding parameter 0 - probably unsupported type.
```

any ideas? cheers,

Comment: What is the value of the variable "include"?

Here is the accepted answer: The error comes from you passing a dictionary to ```get```

I'm not sure why this error doesn't throw something else instead...

```found_ips = Tag2Node.objects.filter( tag__name=include ).values('ip').distinct()
# values returns a dictionary
q = Q( ip__exact=found_ips[0]['ip'] ) 
nodes = Node.objects.get( q )
```

Comment for this answer: congrats :)    (15 char minimium)


{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 1, 'ContentLicense': 'CC BY-SA 2.5', 'CreationDate': '2011:00:02/23/11', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<python><django>', 'Title': 'InterfaceError: Error binding parameter 0 - probably unsupported type', 'ViewCount': 3899, 'id': 5086730, 'user_AboutMe': '', 'user_AccountId': 311251.0, 'user_DisplayName': 'yee379', 'user_Reputation': 6032.0, 'user_Views': 301.0, 'user_id': 624724.0}}