Hey all, excited to be here!
I'm new at this and am looking for a way to dig into the items of a list or properties of a dictionary entry. I'm probably missing something as a Python novice. Usually, I'll do something like algorithm.Log(coarse[0]) to see a list of object properties in JavaScript but I'm striking out accomplishing this in Python. The error I keep running into is…
Runtime Error: TypeError : 'filter' object is not subscriptable
at SelectCoarse
algorithm.Log(str(coarse[0]))
The docs are great but I'd like to be able to log object properties and see what's available at a glance. Does anyone know how I could go about doing that?
Thanks for the help!
Mak K
Hi Justin,
See attached backtest as a very basic list and dictionary logging demonstration.
Please see the following articles regarding Logging limits, Debugging to the console and using the algorithm code Debug feature:
Code Debug
Logging
Thanks
Varad Kabade
Hi Justin Busa,
If we use the following snippet in your algorithm, you can log the complete information of the variable/object:
Best,
Varad Kabade
Justin Busa
Thank you both for the help!
Justin Busa
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!