Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

byte error while reproducing the processed data #30

Open
Wisharyco opened this issue Jun 14, 2019 · 1 comment
Open

byte error while reproducing the processed data #30

Wisharyco opened this issue Jun 14, 2019 · 1 comment

Comments

@Wisharyco
Copy link

Wisharyco commented Jun 14, 2019

While I am processing the data by myself in my local machine, I encountered the following issue:

Traceback (most recent call last):
File "make_datafiles.py", line 241, in
write_to_bin(all_test_urls, os.path.join(finished_files_dir, "test.bin"))
File "make_datafiles.py", line 186, in write_to_bin
tf_example.features.feature['article'].bytes_list.value.extend([article])
TypeError: "-lrb- cnn -rrb- -- spirit airlines said thursday it 's sorry that hundreds of passengers had flight has type str, but expected one of: bytes

I indeed modified the code a bit so that I can only process the cnn data (not dm)
but it seems that the above error does not come from my modification.

Can anybody share your insight with this issue?

@yooogurt
Copy link

i tried add "article = article.encode()" before this and it worked.

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

No branches or pull requests

2 participants