Back

Unhandled Exception: System.NotImplementedException

Hello there,

Somehow I am troubled with an exception indicating that a method is not implemented (System.NotImplementedException) when running in backtesting-desktop environment. I have the problem on 2 Windows 10 environments with Visual Studio. The 'backtesting' environment is wortking without any problems. About a month ago it was still working (then I just used 'desktop' environment, when last days I enabled 'desktop-environment' again it did not work anymore) A fresh pull from Lean from github results in the same problem....

It might be Windows related.

When:

  • I clone the latest source from github (in an empty directory)
  • modify config.json
    • environment": "backtesting-desktop", (backtesting is working fine)
    • "job-user-id": "xxx"
    • "api-access-token": "xxx",
    • in backtesting-desktop (debug to release)
      • "desktop-exe": "../../../UserInterface/bin/Release/QuantConnect.Views.exe"
      • Somehow  I always need to rename the directory in which Views.exe resides (debug is not build, from a clean checkout).
  • build both Launcher and views
  • when I start the program in visual studio, I get the following stacktrace:
    • Unhandled Exception: System.NotImplementedException: The method or operation is not implemented.
      at QuantConnect.Util.SeriesJsonConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer) in C:\Users\Me\Downloads\Lean\Common\Util\SeriesJsonConverter.cs:line 71
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
    • the desktop stops at the exception, the launcher keeps working
    • full output at the end of this discussion

 

Any ideas, what is causing this problem ?

Best regards,

Jan.

 

full output:

20180828 21:35:53.771 Trace:: Config.Get(): Configuration key not found. Key: plugin-directory - Using default value:
20180828 21:35:53.796 Trace:: Config.Get(): Configuration key not found. Key: composer-dll-directory - Using default value: C:\Users\Me\Downloads\Lean\Launcher\bin\Debug\
20180828 21:35:54.937 Trace:: Python for .NET Assembly: Python.Runtime, Version=2.4.0.0, Culture=neutral, PublicKeyToken=null
20180828 21:35:56.155 Trace:: Python for .NET Assembly: nPython, Version=2.4.0.0, Culture=neutral, PublicKeyToken=null
20180828 21:35:56.361 Trace:: Config.GetValue(): debug-mode - Using default value: False
20180828 21:36:00 Trace:: Config.Get(): Configuration key not found. Key: data-directory - Using default value: ../../../Data/
20180828 21:36:00 Trace:: Config.Get(): Configuration key not found. Key: version-id - Using default value:
20180828 21:36:00 Trace:: Config.Get(): Configuration key not found. Key: cache-location - Using default value: ../../../Data/
20180828 21:36:00 Trace:: Engine.Main(): LEAN ALGORITHMIC TRADING ENGINE v2.4.0.0 Mode: DEBUG (64bit)
20180828 21:36:00 Trace:: Engine.Main(): Started 9:36 PM
20180828 21:36:03 Trace:: Engine.Main(): Memory 70Mb-App 4Mb-Used 2407Mb-Total
20180828 21:36:03 Trace:: Config.GetValue(): job-project-id - Using default value: 0
20180828 21:36:03 Trace:: Config.Get(): Configuration key not found. Key: algorithm-path-python - Using default value: ../../../Algorithm.Python/
20180828 21:36:03 Trace:: Config.Get(): Configuration key not found. Key: lean-manager-type - Using default value: LocalLeanManager
20180828 21:36:03 Trace:: Config.Get(): Configuration key not found. Key: cloud-api-url - Using default value: https://www.quantconnect.com/api/v2/
20180828 21:36:03 Trace:: JobQueue.NextJob(): Selected QuantConnect.Algorithm.CSharp.dll
20180828 21:36:03 Trace:: Config.Get(): Configuration key not found. Key: history-provider - Using default value: SubscriptionDataReaderHistoryProvider
20180828 21:36:04 Trace:: Config.GetValue(): ignore-version-checks - Using default value: False
20180828 21:36:04 Trace:: Config.GetValue(): algorithm-manager-time-loop-maximum - Using default value: 20
20180828 21:36:04.803 Trace:: Config.Get(): Configuration key not found. Key: data-directory - Using default value: ../../../Data/
20180828 21:36:04.810 Trace:: Config.Get(): Configuration key not found. Key: version-id - Using default value:
20180828 21:36:04.810 Trace:: Config.Get(): Configuration key not found. Key: cache-location - Using default value: ../../../Data/
20180828 21:36:05 Trace:: Loader.TryCreateILAlgorithm(): Loading only the algorithm assembly
20180828 21:36:06 Trace:: Loader.TryCreateILAlgorithm(): Loaded BasicTemplateFrameworkAlgorithm
20180828 21:36:06 Trace:: Config.Get(): Configuration key not found. Key: security-data-feeds - Using default value:
20180828 21:36:06 Trace:: BacktestingResultHandler(): Sample Period Set: 04.00
20180828 21:36:06 Trace:: Config.GetValue(): forward-console-messages - Using default value: True
20180828 21:36:06 Trace:: JOB HANDLERS:
20180828 21:36:06 Trace:: DataFeed: QuantConnect.Lean.Engine.DataFeeds.FileSystemDataFeed
20180828 21:36:06 Trace:: Setup: QuantConnect.Lean.Engine.Setup.ConsoleSetupHandler
20180828 21:36:06 Trace:: RealTime: QuantConnect.Lean.Engine.RealTime.BacktestingRealTimeHandler
20180828 21:36:06 Trace:: Results: QuantConnect.Lean.Engine.Results.BacktestingResultHandler
20180828 21:36:06 Trace:: Transactions: QuantConnect.Lean.Engine.TransactionHandlers.BacktestingTransactionHandler
20180828 21:36:06 Trace:: Alpha: QuantConnect.Lean.Engine.Alphas.DefaultAlphaHandler
20180828 21:36:06 Trace:: History Provider: QuantConnect.Lean.Engine.HistoricalData.SubscriptionDataReaderHistoryProvider
20180828 21:36:07 Trace:: Launching analysis for BasicTemplateFrameworkAlgorithm with LEAN Engine v2.4.0.0
20180828 21:36:07 Trace:: AlgorithmManager.Run(): Begin DataStream - Start: 10/7/2013 12:00:00 AM Stop: 10/11/2013 11:59:59 PM
20180828 21:36:07 Trace:: FileSystemDataFeed.GetEnumerator(): Begin: 10/7/2013 4:00:00 AM UTC
20180828 21:36:07 Trace:: Purchased Stock: SPY
20180828 21:36:08 Trace:: FileSystemDataFeed.Run(): Data Feed Completed at 10/11/2013 8:00:00 PM UTC
20180828 21:36:08 Trace:: AlgorithmManager.Run(): Firing On End Of Algorithm...
20180828 21:36:08 Trace:: Engine.Run(): Exiting Algorithm Manager
20180828 21:36:08 Trace:: StreamingApi.Transmit(): Packet too long: QuantConnect.Packets.AlphaResultPacket
20180828 21:36:09 Trace:: Algorithm Id:(BasicTemplateFrameworkAlgorithm) completed in 2.40 seconds at 1k data points per second. Processing total of 1,951 data points.
20180828 21:36:09 Trace:: StreamingApi.Transmit(): Packet too long: QuantConnect.Packets.BacktestResultPacket
20180828 21:36:09 Trace:: BacktestingResultHandler.SendAnalysisResult(): Processed final packet
20180828 21:36:09 Trace:: FileSystemDataFeed.Exit(): Exit triggered.

Unhandled Exception: System.NotImplementedException: The method or operation is not implemented.
at QuantConnect.Util.SeriesJsonConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer) in C:\Users\Me\Downloads\Lean\Common\Util\SeriesJsonConverter.cs:line 71
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateDictionary(IDictionary dictionary, JsonReader reader, JsonDictionaryContract contract, JsonProperty containerProperty, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateDictionary(IDictionary dictionary, JsonReader reader, JsonDictionaryContract contract, JsonProperty containerProperty, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at QuantConnect.Views.DesktopClient.Run(String port, IDesktopMessageHandler handler) in C:\Users\Me\Downloads\Lean\UserInterface\DesktopClient.cs:line 57
at QuantConnect.Views.Program.<>c__DisplayClass0_0.<Main>b__0() in C:\Users\Me\Downloads\Lean\UserInterface\Program.cs:line 25
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
20180828 21:36:09 Trace:: StreamingApi.Transmit(): Packet too long: QuantConnect.Packets.AlphaResultPacket
20180828 21:36:09 Trace:: BrokerageTransactionHandler.Run(): Ending Thread...
20180828 21:36:09 Trace:: DefaultAlphaHandler.Exit(): Exiting Thread...
20180828 21:36:09 Trace:: FileSystemDataFeed.Run(): Ending Thread...
20180828 21:36:09 Trace:: DefaultAlphaHandler.Run(): Ending Thread...
20180828 21:36:09 Trace:: BacktestingResultHandler.Run(): Ending Thread...
20180828 21:36:09 Trace:: Waiting for threads to exit...
20180828 21:36:19 Trace:: Engine.Run(): Disconnecting from brokerage...
20180828 21:36:19 Trace:: Engine.Run(): Disposing of setup handler...
20180828 21:36:19 Trace:: Engine.Main(): Analysis Completed and Results Posted.
20180828 21:36:19 Trace:: FileSystemDataFeed.Exit(): Exit triggered.
Engine.Main(): Analysis Complete. Press any key to continue.

Update Backtest







Update Backtest





0

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.


Loading...

This discussion is closed