I have this option set in my code, according to the documentation I believe, but it is throwing this error:

Runtime Error: 'OptionContract' object has no attribute 'IsTradable'
  at <listcomp>
    tradable_call_contracts = [contract for contract at chain if contract.Right == OptionRight.Call and contract.IsTradable]
 in main.py: line 119
  at OnData
    tradable_call_contracts = [contract for contract at chain if contract.Right == OptionRight.Call and contract.IsTradable]
   at Python.Runtime.PythonException.ThrowLastAsClrException()

The algo is skipping a lot of trades because: 

The security with symbol 'SPXW 221221C03875000' is marked as non-tradable.

So I am trying to figure out how to get it to select an option that is tradeable.. I'm using this in the initialize:

underlying = self.AddIndex("SPX", Resolution.Minute)
options = self.AddIndexOption(underlying.Symbol, "SPXW", Resolution.Minute)
options.SetFilter(lambda u: u.IncludeWeeklys().Strikes(-1, 1).Expiration(0, 0))

and this in OnData:

chain = slice.OptionChains.get(self.symbol)
if not chain: return

# Filter call contracts
call_contracts = [contract for contract in chain if contract.Right == OptionRight.Call]


# We sort the call contracts to find at the money (ATM) contract with closest expiration
contracts = sorted(sorted(sorted(call_contracts, \
key=lambda x: x.Expiry), \
key=lambda x: abs(chain.Underlying.Price - x.Strike)), \
key=lambda x: x.Right, reverse=True)


# If found, buy it
if len(contracts) == 0: return
symbol = contracts[0].Symbol


self.MarketOrder(symbol, 1)