Getting the following error. Doesn't happen all the time. If I run my algo for the last month there are no errors. Any longer time frames and this pops up. However, there is nothing around line 252 and I've adjusted code and deleted lines and it still says 252. Any suggestions?
Value cannot be null. (Parameter 'key') in SecurityManager.cs:line 252
Louis Szeto
Hi David
It is not line 252 from your main.py or any custom file, but in LEAN's SecurityManager.cs file. It looks like you're referencing a null object as the Securities dictionary's key somewhere in your algorithm.
Best
Louis
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.
David E
I think my optionsfilter was pulling old expired contracts for some reason. Once I fixed that issue this problem has stopped.
David E
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.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!