QuantConnect/Lean · error · RegressionTestException
No points were received
Error message
No points were received
What it means
Asserts that OnData was invoked at least once during the run. _noDataPointsReceived is set true in Initialize and cleared to false on the first OnData call; if it remains true at OnEndOfAlgorithm, no slice ever reached the algorithm.
Source
Thrown at Algorithm.CSharp/CustomDataWorksWithDifferentExchangesRegressionAlgorithm.cs:64
}
_noDataPointsReceived = true;
}
public override void OnData(Slice slice)
{
_noDataPointsReceived = false;
if (slice.Count != ActiveSecurities.Count)
{
throw new RegressionTestException($"{ActiveSecurities.Count.ToString().ToCamelCase()} data points were expected, but only {slice.Count} were received");
}
}
public override void OnEndOfAlgorithm()
{
if (_noDataPointsReceived)
{
throw new RegressionTestException($"No points were received");
}
}
/// <summary>
/// This is used by the regression test system to indicate if the open source Lean repository has the required data to run this algorithm.
/// </summary>
public bool CanRunLocally { get; } = true;
/// <summary>
/// This is used by the regression test system to indicate which languages this algorithm is written in.
/// </summary>
public List<Language> Languages { get; } = new() { Language.CSharp };
/// <summary>
/// Data Points count of all timeslices of algorithm
/// </summary>
public long DataPoints => 94;
View on GitHub (pinned to d2c3659f87)
Solutions
- Confirm the data files for all subscribed symbols exist for the StartDate-EndDate range in the data folder.
- Verify each AddData/AddSecurity call uses the correct market and symbol casing so subscriptions resolve.
- Check GetSource for custom data returns an accessible URL/path and Reader parses non-empty rows.
- Run with data-feed logging enabled to see whether the subscription ever produced a packet.
Example fix
// before: custom source returns nothing
public override BaseData Reader(...) => null;
// after: parse and return a valid point
public override BaseData Reader(SubscriptionDataConfig config, string line, DateTime date, bool isLiveMode)
{
var d = new ExampleCustomData { Symbol = config.Symbol, Time = date, Value = decimal.Parse(line) };
return d;
} Defensive patterns
Strategy: validation
Validate before calling
// In OnEndOfAlgorithm, degrade gracefully instead of throwing
if (_noDataPointsReceived)
Log("WARNING: no data points received; check subscriptions and data files."); Prevention
- Verify data files exist for every subscribed symbol and the StartDate-EndDate range.
- Confirm AddData/AddSecurity market and symbol casing resolve to real subscriptions.
- Test custom-data GetSource/Reader in isolation to ensure they yield non-empty points.
When it happens
Trigger: The algorithm completes its date range without OnData firing once: data files missing, feed not subscribed, or all data filtered out before reaching the algorithm.
Common situations: Required data not present in the local data folder (CanRunLocally notwithstanding), symbol/market mismatch so no subscription resolves, date range outside available data, or a custom data GetSource returning a bad URL/path that yields no rows.
Related errors
- The ticker did not rename throughout the course of its life
- The time zone of security {firstCustomSecurity} should be {T
- The time zone of security {secondCustomSecurity} should be {
- {ActiveSecurities.Count.ToString().ToCamelCase()} data point
- Custom data was not received
AI-assisted analysis of QuantConnect/Lean@d2c3659f87 (2026-08-13).
Data as JSON: /api/errors/7e0e956b6dedfb09.
Report an issue: GitHub.