pico icon indicating copy to clipboard operation
pico copied to clipboard

genki.py error and background dataset question

Open kingvision opened this issue 10 years ago • 3 comments

Hi question one: I run the genki.py , got the follow error: python genki.py path/to/genki > trdata Traceback (most recent call last): File "genki.py", line 166, in export(im, r, c, s) File "genki.py", line 116, in export write_rid(im) File "genki.py", line 54, in write_rid sys.stdout.buffer.write(hw) AttributeError: 'file' object has no attribute 'buffer'

question two: I can not download the background dataset using the following link: https://googledrive.com/host/0Bw4IT5ZOzJj6NXlJUFh0UGZCWmc can you give me another link?

kingvision avatar Apr 10 '15 07:04 kingvision

if you using python 2.7 replace sys.stdout.buffer.write(hw) to sys.stdout.write(hw)

mrgloom avatar May 15 '15 15:05 mrgloom

Also if you are on windows, you must add folowing code:

if sys.platform == "win32":
    import os, msvcrt
    msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)

if sys.platform == "win64":
    import os, msvcrt
    msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)

http://stackoverflow.com/questions/2374427/python-2-x-write-binary-output-to-stdout

mrgloom avatar May 23 '15 15:05 mrgloom

Thanks, i had fixed the error.

kingvision avatar May 24 '15 00:05 kingvision