我试图使用http://grantcox.com.au/2012/01/decoding-b4u-binary-file-format/ Python代码将.b4u文件导出为HTML格式,但由于某些原因在程序点后:Python - 读取.b4u文件 - 错误序列项目0:期望的str实例,找到的字节
# find the initial caret position - this changes between files for some reason - search for the "Cards" string
for i in range(3):
addr = 104 + i*4
if ''.join(self.parser.read('sssss', addr)) == 'Cards':
caret = addr + 32
break
if caret is None:
return
我得到以下错误:
if ''.join(self.parser.read('sssss', addr)) == 'Cards':
TypeError: sequence item 0: expected str instance, bytes found
我使用的Python版本是:Python的3.3.1(V3.3.1:d9893d13c628,2013年4月6日,20时25分12秒)。
任何想法如何解决这个问题?
你是否解决了你的问题? – 2015-05-10 15:30:13