44670 / layeredFS

layeredFS 游戏翻译数据包生成工具
35 stars 9 forks source link

"The STR doesn't support the buffer API" #4

Open ElyosOfTheAbyss opened 8 years ago

ElyosOfTheAbyss commented 8 years ago

I get this error: C:\layeredFS-master>locate.py workdir\dump.bin Traceback (most recent call last): File "C:\layeredFS-master\locate.py", line 102, in save('mountRom', findFunction(code, parseHexStr('0C 00 9D E5 00 10 90 E5 28 10 91 E5 31 FF 2F E1 '))); File "C:\layeredFS-master\locate.py", line 24, in findFunction t = code.find(sig); TypeError: Type str doesn't support the buffer API And this happens to all games

44670 commented 8 years ago

python 3 is not supported, try python 2.7

ElyosOfTheAbyss commented 8 years ago

Ok, But now I have this error

C:\layeredFS-master>locate.py workdir\dump.bin Traceback (most recent call last): File "C:\layeredFS-master\locate.py", line 98, in <module> with open(sys.argv[1], 'rb') as f: IndexError: list index out of range

44670 commented 8 years ago

edit the bat file and try again:

python locate.py workdir\dump.bin

ElyosOfTheAbyss commented 8 years ago

That just gave me another error C:\layeredFS-master>python locate.py workdir\dump.bin 'python' is not recognized as an internal or external command, operable program or batch file.

44670 commented 8 years ago

the python for windows may have not been installed correctly, check the path variable or re-install the python.

ElyosOfTheAbyss commented 8 years ago

Still didn't work. I have 2.7.0 Should it be something abit higher?

44670 commented 8 years ago

2.7.0 is ok. maybe you should try another computer...

phecdaDia commented 8 years ago

( Just answering for future people )

Use the explicite path, Like: C:\Python27\python.exe , not just "python", as this references the PATH variable.

44670 commented 8 years ago

ah, I see