我正在尝试使用http://grantcox.com.au/2012/01/decoding-b4u-binary-file-format/ Python 代码将 .b4u 文件导出为 HTML 格式,但由于某种原因在程序点之后:
# 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, Apr 6 2013, 20:25:12)。
知道如何解决这个问题吗?