Python 缩进错误:意外的缩进
这是我的代码……我遇到了一个缩进错误,但我不知道为什么会出现这个错误。
->
# loop
while d <= end_date:
# print d.strftime("%Y%m%d")
fecha = d.strftime("%Y%m%d")
# Set URL
url = 'http://www.wpemergencia.omie.es//datosPub/marginalpdbc/marginalpdbc_' + fecha + '.1'
# Descargamos fichero
response = urllib2.urlopen(url)
# Abrimos fichero
output = open(fname,'wb')
# Escribimos fichero
output.write(response.read())
# Cerramos y guardamos fichero
output.close()
# fecha++
d += delta