ports.UnassignedPortException

exception ports.UnassignedPortException(port: int)

Thrown when accessing an unassigned port.

from ports import PortReference

PortReference(0)

The above code will raise an UnassignedPortException when run with no controllable assigned to port 0 in the properties tab of the microcontroller with this script.