使用Python+Selenium過程當中中常見的問題彙總

一、提示:UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 542: ordinal not in range(128)編碼

   緣由:緣由就是Python的str默認是ascii編碼,和unicode編碼衝突spa

   解決方法:code

  import sys   reload(sys)   sys.setdefaultencoding('utf8')

二、ci

相關文章
相關標籤/搜索