gan icon indicating copy to clipboard operation
gan copied to clipboard

TypeError: write() argument must be str, not bytes

Open jamesnogra opened this issue 7 years ago • 1 comments

Hi, I'm getting this error.

  File "make_record.py", line 30, in <module>
    record.write(img.tostring())
TypeError: write() argument must be str, not bytes

I have my digits folder (all bmp files with the same size) inside the gan folder. I tried to run the script using this command:

python make_record.py --images-path=./digits --record-path=./train

Please help.

jamesnogra avatar Apr 19 '18 07:04 jamesnogra

Hi, in the line 19 of make_record.py should be changed to with open(record_path, 'wb') as record:

MoncefYabi avatar Sep 27 '18 11:09 MoncefYabi