这是代码:
def main(request):
..........
div_list = soup.select('div')
count = 0
for div in div_list:
count = count+1
..........
错误:
UnboundLocalError at /
local variable 'div_list' referenced before assignment
我无法理解它。我疯了吗?错误在哪里?