It means that statement
in None. So probably this line: soup.find ( 'table' , { 'class' : "financialStatement" })
doesn't find anything and returns None.
You could add an if statement to test if statement has a value:
if statement:
rows = statement.findAll ( 'tr' )
else:
rows = None