kaggle-cli icon indicating copy to clipboard operation
kaggle-cli copied to clipboard

'NoneType' object has no attribute 'find'

Open aliasneo1 opened this issue 8 years ago • 11 comments

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

'NoneType' object has no attribute 'find'

is thrown.

aliasneo1 avatar Oct 06 '17 14:10 aliasneo1

What's your kaggle-cli version?

floydwch avatar Oct 06 '17 15:10 floydwch

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

floydwch avatar Oct 06 '17 15:10 floydwch

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

bsatts avatar Oct 10 '17 19:10 bsatts

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.

yuerlong avatar Oct 17 '17 00:10 yuerlong

@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.

floydwch avatar Oct 17 '17 00:10 floydwch

@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.

yuerlong avatar Oct 18 '17 03:10 yuerlong

@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?

floydwch avatar Oct 18 '17 03:10 floydwch

@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.

yuerlong avatar Oct 18 '17 04:10 yuerlong

@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 .

floydwch avatar Oct 18 '17 15:10 floydwch

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.

ogrisel avatar Feb 08 '18 16:02 ogrisel

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

bsatts avatar Feb 08 '18 19:02 bsatts