Python not working on PC


Traceback (most recent call last):
File "python", line 3, in
AttributeError: 'NoneType' object has no attribute 'lower'

this EROR is always being shown once I try to run this code on my PC:

parrot = "Norwegian Blue"
print (parrot).lower()

I was using the latest Python version downloaded from official website. How do I solve this problem??? This code is running in Codecademy exercises.


Is that your code exactly as copied? If so then your installation of python is probably corrupt. In that case uninstall everything, delete all python folders for that version then reinstall.

I would also check out the official site too about installation woes.


Nope, that's not it. Try again!

Python is behaving just like it should here. There is no need for a re-install.


So what is going on then, I pasted it and it works as it should, so I might be too tired to figure it out.


That's being run in Python 3


If it was being run in 3 wouldn't it complain about lack of parenthesis for print instead of a attribute error?


Oh but they are there!


I see now!

Too tied I guess it is bed time then.


Download Python 2.7 and use that instead. It will happily install next to Python 3.

If you're feeling adventurous you can try to get it to run into Python 3, see it as an exercise in google-fu


I reinstalled Python, installed latest version, and yeah I deleted all the folders before installing


I never suggested reinstalling Python. Quite the opposite. Might want to take a second read through the conversation above! Or even just the part I directed at you, since some of that was a little over your head.