I can't figure this out for the life of me as in other parts of the project there are similarly referenced modules/classes that don't raise this error. Note that I've set up RsiAlphaModel the same way I have with MainAlgorithm - yet the MainAlgorithm class declaration doesn't throw an error and RsiAlphaModel does. My project directory has folders "Alphas", "Indicators" and "Algorithms" aside from main.py. Hoping someone can shed some light on this.

from Algorithms import StandardAlgorithm
from Alphas import RsiAlphaModel

class MainAlgorithm(StandardAlgorithm):

def Initialize(self):
# Securities traded
symbols = [ Symbol.Create("CRNS", SecurityType.Equity, Market.USA) ]
self.SetUniverseSelection( ManualUniverseSelectionModel(symbols) )

class StandardAlphaModel(AlphaModel):

def Initialize(self):
self.Indicator = None

def OnSecuritiesChanged(self, algorithm, changes):
for security in changes.AddedSecurities:
for minutes, timeframe in algorithm.timeframes.items():
algorithm.RegisterIndicator(security.Symbol.Value, self.Indicator, timeframe)
class StandardAlgorithm(QCAlgorithmFramework):

def Initialize(self):

def SetSecurities(self, security):

def OnSecuritiesChanged(self, changes):
for security in changes.AddedSecurities:
for minutes, timeframe in self.timeframes.items():
self.SubscriptionManager.AddConsolidator(security.Symbol.Value, timeframe)

for security in changes.RemovedSecurities:
for minutes, timeframe in self.timeframes.items():
self.SubscriptionManager.RemoveConsolidator(security.Symbol.Value, timeframe)

def SetTimeframes(self):
self.UniverseSettings.Resolution = Resolution.Minute
self.timeframes = {
1: None,
5: None,
15: None,
30: None,
60: None,
240: None,
390: None,
1950: None
for minutes in self.timeframes:
self.timeframes[minutes] = TradeBarConsolidator(TimeSpan.FromMinutes(minutes))
self.timeframes[minutes].DataConsolidated += self.OnDataConsolidated

def OnDataConsolidated(self, sender, bar):
from Alphas import StandardAlphaModel
from Indicators import EhlerRsiDiscriminator

# This is where the error occurs!
class RsiAlphaModel(StandardAlphaModel):

def Initialize(self):
self.Name = "RSI Alpha"
self.Indicator = EhlerRsiDiscriminator(true, 48, 10)