Open
Description
Actual Behavior
I am facing an exception on LiveAuxiliaryDataSynchronizingEnumerator.cs
2023-01-25 11:10:00 Runtime Error: Instant out of range for DateTime in LiveAuxiliaryDataSynchronizingEnumerator.cs:line 179
2023-01-25 11:10:00 Runtime Error: Instant out of range for DateTime in LiveAuxiliaryDataSynchronizingEnumerator.cs:line 179: StackTrace: System.Exception: Instant out of range for DateTime in LiveAuxiliaryDataSynchronizingEnumerator.cs:line 179
---> System.InvalidOperationException: Instant out of range for DateTime
at NodaTime.Instant.ToDateTimeUtc()
at NodaTime.ZonedDateTime.ToDateTimeUtc()
at QuantConnect.Lean.Engine.DataFeeds.Enumerators.LiveAuxiliaryDataSynchronizingEnumerator.DataPointEmitted(DateTime frontierUtc) in C:\Users\amolg\source\repos\LeanSetups\Setup_2\Lean\Engine\DataFeeds\Enumerators\LiveAuxiliaryDataSynchronizingEnumerator.cs:line 179
at QuantConnect.Lean.Engine.DataFeeds.Enumerators.LiveAuxiliaryDataSynchronizingEnumerator.MoveNext() in C:\Users\amolg\source\repos\LeanSetups\Setup_2\Lean\Engine\DataFeeds\Enumerators\LiveAuxiliaryDataSynchronizingEnumerator.cs:line 76
at QuantConnect.Lean.Engine.DataFeeds.Enumerators.FillForwardEnumerator.MoveNext() in C:\Users\amolg\source\repos\LeanSetups\Setup_2\Lean\Engine\DataFeeds\Enumerators\FillForwardEnumerator.cs:line 138
at QuantConnect.Lean.Engine.DataFeeds.Enumerators.FrontierAwareEnumerator.MoveNext() in C:\Users\amolg\source\repos\LeanSetups\Setup_2\Lean\Engine\DataFeeds\Enumerators\FrontierAwareEnumerator.cs:line 83
at QuantConnect.Lean.Engine.DataFeeds.Enumerators.SubscriptionFilterEnumerator.MoveNext() in C:\Users\amolg\source\repos\LeanSetups\Setup_2\Lean\Engine\DataFeeds\Enumerators\SubscriptionFilterEnumerator.cs:line 123
at QuantConnect.Lean.Engine.DataFeeds.Enumerators.SubscriptionDataEnumerator.MoveNext() in C:\Users\amolg\source\repos\LeanSetups\Setup_2\Lean\Engine\DataFeeds\Enumerators\SubscriptionDataEnumerator.cs:line 71
at QuantConnect.Lean.Engine.DataFeeds.Subscription.MoveNext() in C:\Users\amolg\source\repos\LeanSetups\Setup_2\Lean\Engine\DataFeeds\Subscription.cs:line 206
at QuantConnect.Lean.Engine.DataFeeds.SubscriptionSynchronizer.Sync(IEnumerable`1 subscriptions, CancellationToken cancellationToken)+MoveNext() in C:\Users\amolg\source\repos\LeanSetups\Setup_2\Lean\Engine\DataFeeds\SubscriptionSynchronizer.cs:line 116
at QuantConnect.Lean.Engine.DataFeeds.LiveSynchronizer.StreamData(CancellationToken cancellationToken)+MoveNext() in C:\Users\amolg\source\repos\LeanSetups\Setup_2\Lean\Engine\DataFeeds\LiveSynchronizer.cs:line 118
Expected Behavior
I have tried debugging the LiveAuxiliaryDataSynchronizingEnumerator.cs at line 179. It is trying to convert the EndTime to UTC. EndTime was already matching with the UTC. I am in India which is GMT+5:30 (TimeZones.Kolkata). I am not sure what the actual behavior but the aforementioned behavior is incorrect.
Also, all subscribed symbols are unsubscribed on the first tick.
Potential Solution
Reproducing the Problem
Checkout following 2 repos in empty
https://github.com/Amol-Gupta/Lean.git
https://github.com/Amol-Gupta/Lean.Brokerages.Samco.git
checkout temp1 branch On both repo. Fill in credentials for samco. Build, Run. that will help in reporoducing the isssue
System Information
Windows 11. Visual studio.
Checklist
- I have completely filled out this template
- I have confirmed that this issue exists on the current
master
branch - I have confirmed that this is not a duplicate issue by searching issues
- I have provided detailed steps to reproduce the issue