I am probably missing something very basic here, but using the following code, I can connect to the IG Streaming service but when I try and raise a subscription, I just get "Subscription error". No more information as to what is going on than that. I've tried to attach some logging but it doesn't really provide any insight.

Would anyone be able to tell me what I have failed to do here?

from lightstreamer_client import *


# I've borrowed this listerner code and stuck some random print statements in. Nothing ever seems to get called from this listerner which is interesting.
class SubListener:
def onItemUpdate(self, update):
print("{stock_name:<19}: Last{last_price:>6} - Time {time:<8} - "
"Bid {bid:>5} - Ask {ask:>5}".format(
stock_name=update.getValue("stock_name"),
last_price=update.getValue("last_price"),
time=update.getValue("time"),
bid=update.getValue("bid"),
ask=update.getValue("ask")))
pass
def onClearSnapshot(self, itemName, itemPos):
pass
def onCommandSecondLevelItemLostUpdates(self, lostUpdates, key):
pass
def onCommandSecondLevelSubscriptionError(self, code, message, key):
pass
def onEndOfSnapshot(self, itemName, itemPos):
pass
def onItemLostUpdates(self, itemName, itemPos, lostUpdates):
pass
def onListenEnd(self):
pass
def onListenStart(self):
pass
def onSubscription(self):
print("hello")
pass
def onSubscriptionError(self, code, message):
print("There has been some kind of error")
print(code)
print(message)
pass
def onUnsubscription(self):
pass
def onRealMaxFrequency(self, frequency):
pass




#Import the various settings - This all seems to work
client = LightstreamerClient(spread_bet_account, password, streamurl)


#If I use these settings on IG streaming companion, they all work
subscription_data = LightstreamerSubscription("MERGE", "MARKET:IX.D.FTSE.CFD.IP", "BID", "QUOTE_ADAPTER")

#create the listerner
hearme = SubListener

#attach the listerner to the subscription ask
subscription_data.addlistener(hearme)

#Connect to the server which the logging says is sucessful
client.connect()

#and then errors when I call this
client.subscribe(subscription_data)