KiCAD V9.04, symbol used CNY17-1 and 4N35
This is similar to prior forum post.
I’ve now replicated it with both 4N35 and CNY17-1 optocouplers. I discovered the problem trying to use ngspice (via KiCAD)
KiCAD example files are zipped and attached.
THIS IS AN EXAMPLE THAT DEMONSTRATES THE PROBLM. E.g. yes I know that U2 seems to have Anode & Cathode reverse biased!
Resulting Netlist is:

.title KiCad schematic
.include "C:/xxxxxxxx_Rextor Group/KiCAD_ngspice/CNY17_10ma/Spice Model_BJT_10mA/CNY17_10mA.lib"
V1 VCC GND DC 5
R4 VCC Net-_R4-Pad2_ 330
XU2 GND Net-_R4-Pad2_ unconnected-_U2-NC-Pad3_ GND BJT_10mA
R1 VCC Net-_R1-Pad2_ 330
XU1 Net-_R1-Pad2_ GND unconnected-_U1-NC-Pad3_ GND BJT_10mA
TP2 __TP2
TP1 __TP1
R2 Net-_R2-Pad1_ VCC 2k
R3 VCC Net-_R3-Pad2_ 2k
.end
NOTE the “unconnected-U1-NC-Pad3” that’s the NC that is built into both the 4N35 and CNY17-1 schematic symbol.
4N35 schematic symbol:
The spice model is from Vishay, it’s the model used for many optocouplers.
* Library of DC Input Phototransistor Output Optocoupler BJT_10mA
* Copyright VISHAY, Inc. 2018 All Rights Reserved.
*
* ==== BJT_10mA ====
* A = diode anode
* K = diode cathode
* C = BJT collector
* E = BJT emitter
*$
.SUBCKT BJT_10mA A K C E PARAMS: REL_CTR=1
D1 A D DIRED ;IRED
Vsense D K 0 ;IF Current sense
Hd R 0 Vsense 1 ;I-V
Rd R T 10K
Cd T 0 0.2n
Rdummy B 0 4G
Q1 C B E [E] QBJT ;phototransistor
* V-I
Gpcg C B TABLE ;Photodetector {(IC vs IF) / Q1 BF}
+ {0.34*REL_CTR*(V(T)**1.658*exp(limit(4.3-60*V(T),-50,50))*
+ ((4*10**(-9)*(REL_CTR**6))-(7*10**(-7)*(REL_CTR**5))+(5*10**(-5)*(REL_CTR**4))-(0.0015*(REL_CTR**3))+
+ (0.023*(REL_CTR**2))-(0.155*(REL_CTR))+2.2261)/100)}
+ (0,0) (10,10)
.model DIRED D IS=1P N=1.948621 BV=6 IBV=10U
+ CJO=18.8P EG=1.424 TT=500N
.model QBJT NPN IS=3.64P BF=100 NF=1.193293 BR=10 TF=13N TR=350n
+ CJE=5.16P CJC=18P VAF=65 ISS=0 CJS=7.74p
.ends
*$
**==================================================================*
* Note:
* Although models can be a useful tool in evaluating device performance,
* they cannot model exact device performance under all conditions, nor
* are they intended to replace breadboarding for final verification.
* Models provided by VISHAY Semiconductors GmbH (“Vishay”) do not represent
* all of the specifications and operating characteristics of the product to
* which the model relates. The models attempt to describe the characteristics
* of typical products. The current data sheet information for a given
* product represents the final design guideline and includes actual
* performance specifications. The accuracy, reliability and compatibility
* of models provided by Vishay are not guaranteed or warranted in any way
* and Vishay disclaims liability of any kind whatsoever, including, without
* limitation, liability for quality, performance, merchantability and fitness
* for a particular purpose arising out of the use, or inability to use a model.
* Vishay reserves the right to change models without prior notice.
* The products described herein, including the model and any results produced
* using the model, are subject to the specific disclaimers set forth at www.vishay.com/doc?91000.
**===================================================================
4N33_eeschema_test.zip (10.9 KB)