Python not working on PC


#1

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"
(parrot).lower()
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.


#2

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.


#3

Nope, that's not it. Try again!

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


#4

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.


#5

That's being run in Python 3


#6

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


#7

Oh but they are there!


#8

I see now!

Too tied I guess it is bed time then.


#9

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


#10

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


#11

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.