floydwch/kaggle-cli

Can not download, list out of range

xr opened this issue ยท 8 comments

xr commented

Python 2.7.12 |Anaconda 4.2.0 (64-bit)| (default, Jul 2 2016, 17:42:40)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2

> pip install kaggle-cli
...
> Successfully installed kaggle-cli-0.12.10

>kg config -g -u xxx -p xxx -c xxx
>kg download
>Starting new HTTPS connection (1): www.kaggle.com
>list index out of range

like above, when type kg download, it will show the error and quit, here is the debug version:

Starting new HTTPS connection (1): www.kaggle.com
list index out of range
Traceback (most recent call last):
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/cliff/command.py", line 137, in run
    return_code = self.take_action(parsed_args) or 0
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/kaggle_cli/download.py", line 32, in take_action
    browser = common.login(username, password)
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/kaggle_cli/common.py", line 33, in login
    login_form = login_page.soup.select("#login-account")[0]
IndexError: list index out of range
Traceback (most recent call last):
  File "/home/ubuntu/anaconda2/bin/kg", line 11, in <module>
    sys.exit(main())
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/kaggle_cli/main.py", line 21, in main
    return app.run(argv)
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/cliff/app.py", line 279, in run
    result = self.run_subcommand(remainder)
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/cliff/command.py", line 137, in run
    return_code = self.take_action(parsed_args) or 0
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/kaggle_cli/download.py", line 32, in take_action
    browser = common.login(username, password)
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/kaggle_cli/common.py", line 33, in login
    login_form = login_page.soup.select("#login-account")[0]
IndexError: list index out of range

any ideas? thanks!

The same problem here! I have already joined the competition.

kg download -u -p -c <competition_name>
Starting new HTTPS connection (1): www.kaggle.com
list index out of range

xr commented

@imomid hi, since i'm doing it from ec2, i have a temporary solution, I used a chrome extension called "CurlWget", then copy those curl code to terminal to download to the server.

@xr I am also trying to download data to a Google Compute Engine! Thanks a lot it worked for now :)

Thanks for the report. Kaggle redesigned the login page, I'll fix the issue soon.

I got a same issue and exactly same error message reported by @xr.
and Thanks to @xr , I successfully downloaded the files to my server using "CurlWget".

plus, thank you @floydwch so much for the quick response!
This cli is really helpful for all users. I really appreciate you and am waiting fix.

Fixed via e10a77c .

I am getting the same error

Getting this error