Always test the command line if there is an issue with the wrapper.
tesseract -v
tesseract 5.3.4-44-g2b07
leptonica-1.84.0 (Dec 31 2023, 23:36:37) [MSC v.1929 LIB Release x64]
libgif 5.1.2 : libjpeg 6b (libjpeg-turbo 2.1.90) : libpng 1.6.40 : libtiff 4.6.0 : zlib 1.2.13.zlib-ng : libwebp 1.3.2 : libopenjp2 2.5.0
Found AVX2
Found AVX
Found FMA
Found SSE4.1
Found OpenMP 200203
tesseract teach_t2.png -
31111
tesseract teach_t2.png - --psm 8
C 3111
tesseract teach_t2.png - --psm 7
31111
seem like psm 8 is not suitable in this case.