fyu / lsun

LSUN Dataset Documentation and Demo Code
531 stars 175 forks source link

Fix export errors caused by lmdb keys being binaries #29

Closed Tenoke closed 3 years ago

Tenoke commented 4 years ago

Currently in python3, lmdb gives the keys as a binary, not string which causes the export to error with:

File "data.py", line 47, in export_images
    image_out_path = join(image_out_dir, key + '.webp')
TypeError: can't concat str to bytes

You can see a Colab without and with the fix here - https://colab.research.google.com/drive/1TUULlY7FkPQXdwN7iFddjAmqwFvaz-h3

hackgoofer commented 4 years ago

Confirmed that this works for me! :)

zeng-hello-world commented 3 years ago

Approval.