Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Accessing CSV Fetch data troubles

I fetch a signal from a csv, and then when I try to access the data in the global data array, it gives me "debugger gives: Tree_expand: This object is no longer in scope" , which I am currently interpreting as that the data is not set. Here is my very simple code, with the url redaced for security reasons:

def initialize(context):
url = "--"
fetch_csv(url, date_column='date', date_format = '%m/%Y/%d %I:%M:%S %p', symbol='frc')
context.security = symbols('BA','CSCO')

def handle_data(context, data):
data['frc']

Any clue as to why this is happening? Any help is greatly appreciated

1 response

Jacob, when do you run into this error?

  1. Do you encounter it when evaluating a statement in the debugger? If so, what statement do you type in?

  2. Or do you encounter it when clicking on a previous result in the debugger window?

If it's the first case, that sounds like a bug and we'll look into it. If it's the second, this is expected. The previous result was for a previous data bar, and is no longer valid in the current bar. Hence it's "out of scope". To view the current results, re-run the query.

If you could tell me more about the situation, we'll see what's going on.

Disclaimer

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.