Error while opening port in Python using TI Chronos

I figured it out. It was simple enough.

I just disabled the COM port in the Device Manager window and enabled it again.


The most common source of such errors is the port being already opened by some other application, or frequently by a previous (executed, but forgotten to kill) instance of your code.

To test this hypothesis, the easiest way is to run some other program that opens the same port (for example, HyperTerminal) when you're getting the error. If it fails also, try to find who's holding the port.

Also, Portmon is a useful tool in debugging similar problems with the serial port.


Another situation that also creates the Access Denied error:

The port permissions are actually set to deny normal user access! Some system administrators lock down ports for good reasons, so only users with administrator privileges can get access.

The simplest work-around is to run cmd.exe as administrator. See Run a Command as Administrator from the Run Box in Windows 7, 8, or 10

Summary: Win + R, "cmd", Shift + Ctrl + Enter

"It Works For Me!" (tm)

Tags:

Python

Port