floydwch / kaggle-cli

(Deprecated, use https://github.com/Kaggle/kaggle-api instead) An unofficial Kaggle command line tool.
MIT License
674 stars 91 forks source link

[Errno 2] No such file or directory .. top_level.txt #48

Closed Issam28 closed 6 years ago

Issam28 commented 7 years ago

when i try to use it i get this error : [Errno 2] No such file or directory: '$HOME/python/lib/python3.6/site-packages/ptyprocess-0.5.2.dist-info/top_level.txt' any ideas how to solve it ? it used to work fine but then i installed something which i forgot and it seems like it deleted that file

boopalanjayaraman commented 7 years ago

I receive a similar error when I try to download a data file using download command. It is a fresh EC2 instance.

[Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/testpath-0.3.1.dist-info/top_level.txt'

boopalanjayaraman commented 7 years ago

I'm sorry, the command form took a new shape in the latest version I guess. Earlier I followed what was there documented in GitHub page.

But after digging little further, the below works. $ -> kg (kg) $ -> download -u username -p password -c competition -f filename

compared to using everything in single line (as documented).

Issam28 commented 7 years ago

still doesn't work ,for me it's not just with download command whatever i type i'll get this error

Issam28 commented 7 years ago

i don't know if this is the right thing to do but i just added a file named "top_level.txt" in the dir "$HOME/python/lib/python3.6/site-packages/ptyprocess-0.5.2.dist-info" and it worked

floydwch commented 7 years ago

It's related to https://bugs.launchpad.net/python-cliff/+bug/1719465 . And it's resolved, use pip install -U kaggle-cli might help.

ArtjomKorol commented 6 years ago

The issue still persists, upgrading the library does not help, adding "top_level.txt" to the directory also does not work.

floydwch commented 6 years ago

@ArtjomKorol What's your Python version?

JulienHeiduk commented 6 years ago

Same thing for me. I have the following error: [Errno 2] No such file or directory: '/usr/local/lib/python3.5/dist-packages/ptyprocess-0.5.2.dist-info/top_level.txt

floydwch commented 6 years ago

I found that kaggle-cli's upstream the cliff package's top_level.txt issue was resolved but not yet published.

As I experimented with creating an empty file for the top_level.txt, the problem fixed. i.e. $ touch /usr/local/lib/python3.5/dist-packages/ptyprocess-0.5.2.dist-info/top_level.txt

This issue shall be fixed when cliff release a new version.

floydwch commented 6 years ago

Or wait! I downgrade the cliff version as a solution. See https://github.com/floydwch/kaggle-cli/commit/df25e6b7eef08126f980641a9c49b26bf588d95d .

Please upgrade kaggle-cli via pip install -U kaggle-cli.

Hope it solved the issue.

JulienHeiduk commented 6 years ago

Thanks floydwch ! I tried this morning and it works now ! Good job !