Back to Community
Pipeline in research notebook fails on last step

Hello, I bit new to Python & Quantopian, but I'm digging it. Trying out a technical system using pipeline in the research notebook and I'm getting a TypeError at the very last step when run_pipeline is called. Any help would be appreciated.

The algorithm is still a work in progress, I need a few more filters and ranking, but I wanted to pause and just ensure I was getting data back.


TypeError: compute() takes exactly 6 arguments (5 given)  
Loading notebook preview...
2 responses

Hi Woodrow,

The TypeError being raised here means that in one of your custom factors, the number of inputs being passed to it differs from the number of inputs that it expects (the inputs listed in def compute(...)).

Taking a quick scan, it seems that this occurs in a few places such as KUpper and KLower where the kupper variable is listed in the parameters for compute() but isn't passed as an input. You should just be able to remove it from the list to fix the issue. I believe that this occurs in some of your other custom factors so I'd suggest going over them and making sure that the number of inputs passed and the number expected match in each custom factor. Take a look at the documentation here for a better explanation.

Let me know if this helps!


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 Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian 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.

Jamie, thanks for taking a look. I found the custom factors that had the input issues and corrected them. I also had a couple of typos and some errors when listing the parameters passed to the talib functions. I've fixed those and now I'm getting output!

Still not quite what I expected, but better than nothing. Review, revise, re-run ;-)