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

'NoneType' object has no attribute 'find' #50

Open aliasneo1 opened 6 years ago

aliasneo1 commented 6 years ago

When submission is made using kg submit -u -p -c -m ""

'NoneType' object has no attribute 'find'

is thrown.

floydwch commented 6 years ago

What's your kaggle-cli version?

floydwch commented 6 years ago

I guess you used an obsolete kaggle-cli, try to pip install -U kaggle-cli to upgrade to the latest.

bsatts commented 6 years ago

I've had the same problem with the latest version of the cli as well.

yuerlong commented 6 years ago

I had the same problem last week. After run "pip isntall -U kaggle-cli" to upgrade to the latest one, it worked well yesterday. but today I have the same problem again.

floydwch commented 6 years ago

@bsatts @yuerlong Did you use inline config to login and submit? i.e. kg submit -u <username> -p <password> -c <competition> -m <message> filename

Try to kg config -u <username> -p <password> and then kg submit -m <message> filename.

The 'NoneType' object has no attribute 'find' exception might come from the login process.

Use config to save the login session might help.

yuerlong commented 6 years ago

@floydwch Thanks for reply. I did use " kg config -u user -p pass -c comptition" before run "kg submit filename". The "NoneType" error still exists.

floydwch commented 6 years ago

@yuerlong So the kg config -u user -p pass -c comptition part is OK? And you got NoneType error when you ran kg submit filename?

yuerlong commented 6 years ago

@floydwch yes, kg config -u user -pass -c contest is OK. It is very weird that kg submit filename worked in the morning but at night NoneType error appears . kg download works fine.

floydwch commented 6 years ago

@yuerlong can you check your kaggle-cli version? By kg --version. It should be kg 0.12.8.

I found there is a fixed issue https://github.com/floydwch/kaggle-cli/issues/35 . This issue should be fixed in version 0.11.4 .

ogrisel commented 6 years ago

I got a similar problem when trying to use kg download. I had to login in the web interface to do the same operation manually and accept the new legal terms and conditions. Once done, the kaggle-cli commands would work again.

bsatts commented 6 years ago

I figured out what the problem was. It's caused any password having $ in it. This causes a problem when used in the config file. If you escape the password with double quotes when passing the password as a parameter it works