Skip to content

Conversation

@sunbohit
Copy link
Contributor

To make the read_words function can be used in Python3.5 without a BUG "TypeError: a bytes-like object is required, not 'str'"

To make the read_words function can be used in Python3.5 without a BUG "TypeError: a bytes-like object is required, not 'str'"
@zsdonghao
Copy link
Member

@sunbohit Thanks, but this modification cannot run under python 3.4 and python 2.7.

     return f.read().replace(*replace).split()
TypeError: Can't convert 'bytes' object to str implicitly

I suggest you to fix it in compatible way.

@sunbohit
Copy link
Contributor Author

@zsdonghao Now it works?

@zsdonghao
Copy link
Member

@sunbohit yes, now it works well with both python 3.4 and 3.5. well done.

@zsdonghao zsdonghao merged commit d0d5d1c into tensorlayer:master Dec 28, 2016
@sunbohit sunbohit deleted the patch-1 branch December 28, 2016 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants