{"record":{"id":"7e0e956b6dedfb09","repo":"QuantConnect/Lean","slug":"no-points-were-received","errorCode":null,"errorMessage":"No points were received","messagePattern":"No points were received","errorType":"exception","errorClass":"RegressionTestException","httpStatus":null,"severity":"error","filePath":"Algorithm.CSharp/CustomDataWorksWithDifferentExchangesRegressionAlgorithm.cs","lineNumber":64,"sourceCode":"            }\n            _noDataPointsReceived = true;\n        }\n\n\n        public override void OnData(Slice slice)\n        {\n            _noDataPointsReceived = false;\n            if (slice.Count != ActiveSecurities.Count)\n            {\n                throw new RegressionTestException($\"{ActiveSecurities.Count.ToString().ToCamelCase()} data points were expected, but only {slice.Count} were received\");\n            }\n        }\n\n        public override void OnEndOfAlgorithm()\n        {\n            if (_noDataPointsReceived)\n            {\n                throw new RegressionTestException($\"No points were received\");\n            }\n        }\n\n        /// <summary>\n        /// This is used by the regression test system to indicate if the open source Lean repository has the required data to run this algorithm.\n        /// </summary>\n        public bool CanRunLocally { get; } = true;\n\n        /// <summary>\n        /// This is used by the regression test system to indicate which languages this algorithm is written in.\n        /// </summary>\n        public List<Language> Languages { get; } = new() { Language.CSharp };\n\n        /// <summary>\n        /// Data Points count of all timeslices of algorithm\n        /// </summary>\n        public long DataPoints => 94;\n","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/QuantConnect/Lean/blob/d2c3659f877bfc2b5d9dc0fc89a9c7566f45e892/Algorithm.CSharp/CustomDataWorksWithDifferentExchangesRegressionAlgorithm.cs#L46-L82","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before: custom source returns nothing\npublic override BaseData Reader(...) => null;\n\n// after: parse and return a valid point\npublic override BaseData Reader(SubscriptionDataConfig config, string line, DateTime date, bool isLiveMode)\n{\n    var d = new ExampleCustomData { Symbol = config.Symbol, Time = date, Value = decimal.Parse(line) };\n    return d;\n}","handlingStrategy":"validation","validationCode":"// In OnEndOfAlgorithm, degrade gracefully instead of throwing\nif (_noDataPointsReceived)\n    Log(\"WARNING: no data points received; check subscriptions and data files.\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["regression-test","no-data","data-feed","custom-data"],"backgroundTag":null,"analyzedSha":"d2c3659f877bfc2b5d9dc0fc89a9c7566f45e892","analyzedAt":"2026-08-13T13:52:21.013Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}