Well I have tried to run the python script with the serial monitor open and with it closed, and I get the same error 5 message as long as the arduino is plugged into my computer before I run the python script. If I run the python script before I plug in my arduino uno I get the error 2 message because python can not find com 3.