Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Mapping quantopian symbols from CSV file

Something went wrong. Sorry for the inconvenience. Try using the built-in debugger to analyze your code. If you would like help, send us an email.
AttributeError: 'int' object has no attribute 'symbol'
USER ALGORITHM:12, in my_universe
context.myUniverse = [s.symbol for s in sids]

def preview(df):
log.info(' \n %s ' % df.head())
return df

Function for returning a set of SIDs from fetcher_data

def my_universe(context, fetcher_data):
sids = set(fetcher_data['sid'])
context.myUniverse = [s.symbol for s in sids]
context.count = len(sids)
print "total universe size:{c}".format(c=context.count)
return sids

def initialize(context):
context.myUniverse = [] #Create an empty list to store stock symbols
context.date = None
context.stocks = [sid(24),sid(290)]
url_x = 'https://copy.com/pBVwHqZhcHMG7mzo'
#url_x = 'https://copy.com/xWjOvUVOjcRmoiU4'
fetch_csv(url_x,
universe_func=(my_universe))
set_benchmark(symbol('SPY'))

This program is able to read the CSV file but not find symbols mentioned in CSV and update them to the set custom universe