码迷,mamicode.com
首页 > 编程语言 > 详细

Python2.7 在使用BSTestRunner.py时报错TypeError: unicode argument expected, got 'str'

时间:2017-11-03 15:25:16      阅读:796      评论:0      收藏:0      [点我收藏+]

标签:使用   python2.7   key   语句   pre   expected   nbsp   div   导入   

python3往这个库中加入了一些新的内容,使得该库在Python2.7中报错。

解决方法是将导入语句

from io import StringIO as StringIO

更换为:

from io import BytesIO as StringIO

 

 

Python2.7 在使用BSTestRunner.py时报错TypeError: unicode argument expected, got 'str'

标签:使用   python2.7   key   语句   pre   expected   nbsp   div   导入   

原文地址:http://www.cnblogs.com/milian0711/p/7778031.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!