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

_csv.Error: iterator should return strings, not bytes (did you open the file in text mode?) #6

Closed
Tushar-Faroque opened this issue May 2, 2020 · 4 comments

Comments

@Tushar-Faroque
Copy link

Hello,
Thank you for your work and the code.
When I run this python3 tools/create_feats.py --infeats bottom_up_tsv --outfolder ./mscoco/feature/up_down_10_100, I am getting this error
_csv.Error: iterator should return strings, not bytes (did you open the file in text mode?)
I am running on python 3.7
Please help me out.

@Panda-Peter
Copy link
Collaborator

Thanks for pointing this out. We have changed the command as "python2 tools/create_feats.py --infeats bottom_up_tsv --outfolder ./mscoco/feature/up_down_10_100" (i.e., python3 -> python2). Everything should be fine now.

@Tushar-Faroque
Copy link
Author

I tried with "python2 tools/create_feats.py --infeats bottom_up_tsv --outfolder ./mscoco/feature/up_down_10_100"
Now, it's showing "ImportError: No module named numpy",
but I have installed numpy=1.16.4 in my environment.
Also, tried with other python versions with different numpy versions

@Panda-Peter
Copy link
Collaborator

Hi, maybe you can refer the processing of tsv in https://github.com/peteanderson80/bottom-up-attention/blob/master/tools/read_tsv.py.

@Tushar-Faroque
Copy link
Author

Okay, Thanks a lot. I will do that.

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