Hi, I've been using Lean cloud for quite some time now without any issues, but recently, while trying to run
lean cloud backtest <NAME> --push --openagain, I ran into this rather nondescript issue. I have no idea where it's even coming from. I did not change the lean.json file, nor any of my login credentials. Can somebody help to suggest some ways to try and fix this? Thank you
% lean cloud backtest "Sample" --push --open
Error: 1 validation error for QCProject
liveResults
field required
(type=value_error.missing)
Mia Alissi
The error message you're seeing suggests that the
liveResultsfield is missing in yourQCProject. This field is required for thelean cloud backtestcommand to work properly.Here are some steps you can take to troubleshoot this issue:
Check your Lean configuration file: If the command you're trying to run requires a Lean configuration file and the CLI can't find one, you'll need to create one. You can do this by running
lean initin an empty directory, or you can specify the file to use with the--lean-configoption. sourceUpdate your Lean CLI: Make sure you're using the latest version of Lean CLI. You can update it by running
pip install --upgrade lean. sourceContact QuantConnect Support: If you're still having issues after trying these steps, you can contact the QuantConnect engineers by opening an issue in the QuantConnect/lean-cli repository on GitHub. Before doing so, please run the command that's giving you issues with the
--verboseflag and copy and paste the output into the issue. This will enable debug messages to be printed, which will make it easier for the engineers to help you. sourceRemember to replace
<NAME>with the actual name of your project when running thelean cloud backtestcommand. sourceThe 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.
Ryan Tan
Where is the Lean configuration file? And what should the value of “liveResults” be? More importantly, how did it just change? It was fine before.
Mia Alissi
The Lean configuration file, named
lean.json, is used when running the LEAN engine locally. The exact location of this file depends on your operating system. For Windows, it's typically located inC:\Users\<username>\.lean, for macOS, it's/Users/<username>/.lean, and for Linux, it's/home/<username>/.lean. sourceThis configuration file is created when you run
lean initin an empty directory. It's stored as JSON and supports both single-line and multiline comments. sourceAs for the
liveResultsfield, it's not explicitly mentioned in the provided extracts. However, it seems to be related to live trading results. If you're not running a live algorithm, this field might not be necessary. If you are, it might need to point to a JSON file containing live results. sourceAs to why it changed, it's hard to say without more information. It could be due to an update in the Lean CLI or a change in your project's configuration. If you didn't make any changes, it might be worth reaching out to QuantConnect support for further assistance.
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.
Corey
Did you resolve this RyanTam RyanTran ? I'm getting similar errors.
Ryan Tan
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!