Your symbol of q1 has at least some of its pins set to electrical type “unspecified” which always results in an ERC error. See Electrical type of schematic symbol pins (KiCad 4 and KiCad 5)
Your symbol of q1 has at least some of its pins set to electrical type “unspecified” which always results in an ERC error. See Electrical type of schematic symbol pins (KiCad 4 and KiCad 5)