51Testing软件测试论坛
标题:
新手学习,帮忙看看这是什么原因
[打印本页]
作者:
shoyan
时间:
2016-7-31 15:36
标题:
新手学习,帮忙看看这是什么原因
Traceback (most recent call last):
File "D:\eclipse\workspace\test\123\123.py", line 6, in <module>
driver = webdriver.Firefox()
File "C:\Python27\lib\site-packages\selenium-2.53.6-py2.7.egg\selenium\webdriver\firefox\webdriver.py", line 85, in __init__
keep_alive=True)
File "C:\Python27\lib\site-packages\selenium-2.53.6-py2.7.egg\selenium\webdriver\remote\webdriver.py", line 90, in __init__
self.start_session(desired_capabilities, browser_profile)
File "C:\Python27\lib\site-packages\selenium-2.53.6-py2.7.egg\selenium\webdriver\remote\webdriver.py", line 177, in start_session
response = self.execute(Command.NEW_SESSION, capabilities)
File "C:\Python27\lib\site-packages\selenium-2.53.6-py2.7.egg\selenium\webdriver\remote\webdriver.py", line 234, in execute
response = self.command_executor.execute(driver_command, params)
File "C:\Python27\lib\site-packages\selenium-2.53.6-py2.7.egg\selenium\webdriver\remote\remote_connection.py", line 398, in execute
data = utils.dump_json(params)
File "C:\Python27\lib\site-packages\selenium-2.53.6-py2.7.egg\selenium\webdriver\remote\utils.py", line 34, in dump_json
return json.dumps(json_struct)
File "C:\Python27\lib\json\__init__.py", line 244, in dumps
return _default_encoder.encode(obj)
File "C:\Python27\lib\json\encoder.py", line 207, in encode
chunks = self.iterencode(o, _one_shot=True)
File "C:\Python27\lib\json\encoder.py", line 270, in iterencode
return _iterencode(o, 0)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xbb in position 3: invalid start byte
作者:
Miss_love
时间:
2016-8-1 09:35
看样子是编码问题,方便贴上代码吗
作者:
jingzizx
时间:
2016-8-1 12:41
看提示是编码不一致的问题
作者:
seagull1985
时间:
2016-8-1 14:31
UnicodeDecodeError: 'utf8' codec can't decode byte 0xbb in position 3: invalid start byte
最后一句话,道出了问题的关键。。。授人以鱼,不如授人以渔。。楼主自己看看吧。。
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2