AttributeError: 'unicode' object has no attribute 'xpath'


刚写代码报错:AttributeError: 'unicode' object has no attribute 'xpath'

场景是这样的:


然后运行就报错:AttributeError: 'unicode' object has no attribute 'xpath'

开始上网找了很多解决办法都没用,后来看到了这里的解决办法:

http://stackoverflow.com/questions/31586169/attributeerror-unicode-object-has-no-attribute-xpath-issue

还有段话这样说的:


使用lxml将 i 转化下,才能正常使用,现在是这样做的:


 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM