Back to Community
I can not debug my fetch_csv algo in quantopian - Need help

I am trying to read a csv file as the following and it works but as soon as I set a break point in the code, it generates an error as:

ValueError: Cannot schedule timeout until _SignalManager has started.
There was a runtime error on line 28.

I need to be able to debug my code, can some body look into this and help me. That would be much appreciated.

this is my code

import quantopian.algorithm as algo
from quantopian.pipeline import Pipeline
from import USEquityPricing
from quantopian.pipeline.filters import QTradableStocksUS
import pandas as pd
def preview(df):' \n %s ' % df.head(15))
return df
def actual_pre_func(df, context):
context.fetched_data = df
return df

def initialize(context):
schedule_function(myfunc, date_rules.every_day(), time_rules.market_close(minutes=30))
# fetcher for sycurity data-when we have symbol in file
url1 = ''
fetch_csv(url1,date_column='date',symbol_column = 'symbol',
pre_func = preview,
post_func = lambda df: actual_pre_func(df, context),
date_format = '%Y-%m-%d',
# post_func=rename_col,
algo.attach_pipeline(make_pipeline(context), 'pipeline')
def make_pipeline(context):
base_universe = QTradableStocksUS()
yesterday_close = USEquityPricing.close.latest
pipe = Pipeline(
'close': yesterday_close,
return pipe

def before_trading_start(context, data):
current_date = str(get_datetime('US/Eastern'))[0:10]
todays_data = context.fetched_data.loc[context.fetched_data.index ==current_date]' \n %s ' % todays_data.head(2))' \n %s ' % todays_data.columns)
context.todays_data = todays_data

def myfunc(context, data):' \n %s ' % context.todays_data.head(2))
for d in data.fetcher_assets:'\n %s %f '%(d,data.current(d, 'fund_ret')))