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