> iterparse() only guarantees that it has seen the “>” character of a starting tag when it emits a “start” event, so the attributes are defined, but the contents of the text and tail attributes are undefined at that point.
而当 end 的时候,你已经把 article.clear() 了
ivanchou
2015-05-08 15:34:01 +08:00
@binux 但当我注释掉 article.clear() 还是同样的错。问题出在 line 24, author.text 为 NoneType