のねのBlog

パソコンの問題や、ソフトウェアの開発で起きた問題など書いていきます。よろしくお願いします^^。

2016-01-05から1日間の記事一覧

bad char in struct format

bad char in struct format-Data = struct.unpack_from('>4s>H>H>H>H', data, offset) Data = struct.unpack_from('>4sHHHH', data, offset)struct.error: bad char in struct format

Can't convert 'bytes' object to str implicitly

Can't convert 'bytes' object to str implicitly Data = struct.unpack_from("<4sHHHH", data, offset) -print("sfntVersion: "+ Data[0]) +print("sfntVersion:", Data[0][0:3])

repeat count given without format specifier

repeat count given without format specifier-Data1 = struct.unpack_from("

unpack requires a bytes object of length 16

struct: unpack Requires String Argument of Length 16

'cp932' codec can't decode byte 0x84 in position 115: illegal multibyte sequence

'cp932' codec can't decode byte 0x84 in position 115: illegal multibyte sequenceバイナリーモードで開くようにした。 -infile = open("arial.ttf", 'r') +infile = open("arial.ttf", 'rb')