kpe / bert-for-tf2

A Keras TensorFlow 2.0 implementation of BERT, ALBERT and adapter-BERT.
https://github.com/kpe/bert-for-tf2
MIT License
802 stars 193 forks source link

Fix for UnicodeDecodeError when building under Docker #54

Closed dfarren closed 4 years ago

dfarren commented 4 years ago

When building this library using Docker, it crashes with the following error: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 9351: ordinal not in range(128)

This happens because of the Chinese characters in the README.rst file. This pull request fixes that by explicitly defining the characters as Unicode and reading the file with utf-8 encoding.

dfarren commented 4 years ago

When will a new version be released in pypi? It seems like there are quite few users facing this issue: https://gitter.im/cortexlabs/cortex?at=5e2fb1c473ddad4acd623e61

Search for UnicodeDecodeError

kpe commented 4 years ago

@dfarren - oh, sorry, I somehow forget to trigger the build. It's ready now! Thank you, once again!

dfarren commented 4 years ago

Thanks @kpe!