AttributeError: 'NoneType' object has no attribute 'replace'
"from detective where name='{0}'".format(name.replace("'","''"))