gamerglen1246:
Well I have tried to run the python script with the serial monitor open
That will not work. Windows does not allow serial ports to be shared.
and with it closed,
That is the correct choice.
and I get the same error 5 message as long as the arduino is plugged into my computer before I run the python script.
You are getting an access denied error before running the Python script?