Lean and python shedule problem


The backtest run successfully online (a basic template, no holding implemented, checking with debug file).

Objective: testing schedule function, history request, reconstructing pandas structure, applying basic math function( quantile in the exemple) and logging result ( ticker+ last close + quantile 75th).

When testing in local mode i have this runtime error:

Data on local files have been checked with editor edit and EveryOK.

self.History seems to be the problem but i have no idea.

Help needed...thanks.

Update Backtest

my error capture is 'text mode' (previous screenshot not readable)


2017-09-25T16:19:53.3258557Z Error Runtime Error: Python.Runtime.PythonException: AttributeError : 'dict' object has no attribute 'close'
   ? Python.Runtime.Dispatcher.Dispatch(ArrayList args)
   ? QuantConnect.Scheduling.ScheduleManager.<>c__DisplayClass16_0.<On>b__0(String name, DateTime time) dans C:\Users\Jbr\Documents\C#\Lean-\Common\Scheduling\ScheduleManager.cs:ligne 131
   ? QuantConnect.Scheduling.ScheduledEvent.OnEventFired(DateTime triggerTime) dans C:\Users\Jbr\Documents\C#\Lean-\Common\Scheduling\ScheduledEvent.cs:ligne 236
   ? QuantConnect.Scheduling.ScheduledEvent.Scan(DateTime utcTime) dans C:\Users\Jbr\Documents\C#\Lean-\Common\Scheduling\ScheduledEvent.cs:ligne 165
   ? QuantConnect.Lean.Engine.RealTime.BacktestingRealTimeHandler.ScanPastEvents(DateTime time) dans C:\Users\Jbr\Documents\C#\Lean-\Engine\RealTime\BacktestingRealTimeHandler.cs:ligne 136
   ? QuantConnect.Lean.Engine.AlgorithmManager.Run(AlgorithmNodePacket job, IAlgorithm algorithm, IDataFeed feed, ITransactionHandler transactions, IResultHandler results, IRealTimeHandler realtime, ILeanManagement leanManagement, CancellationToken token) dans C:\Users\Jbr\Documents\C#\Lean-\Engine\AlgorithmManager.cs:ligne 274
   ? QuantConnect.Lean.Engine.Engine.<>c__DisplayClass8_1.<Run>b__2() dans C:\Users\Jbr\Documents\C#\Lean-\Engine\Engine.cs:ligne 251
 ['  File "C:\\Users\\Jbr\\Documents\\C#\\Lean-\\Algorithm.Python\\", line 55, in CheckChannels\n    h = self.History(, 60,Resolution.Daily).close\n']
2017-09-25T16:19:53.3883562Z Trace Algorithm Id:(AlgorithmPythonWrapper) completed in 1.11 seconds at 0k data points per second. Processing total of 372 data points.


trying to request data in OnData . Fails also (Backtest online is OK)



found solution:

install latest master image from github ( my previous install:

self.History is working now...


Update Backtest


The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


This discussion is closed