cyanfish / naps2

Scan documents to PDF and more, as simply as possible.
https://www.naps2.com
Other
2.58k stars 315 forks source link

Error when OCR after upgrade to 7.4.1 #356

Closed ostasevych closed 2 months ago

ostasevych commented 2 months ago

Hi! After upgrading from 7.4.0 to 7.4.1 I am constantly getting error when performing OCR job:

System.FormatException: Input string was not in a correct format.
   at float Number.ParseSingle(string value, NumberStyles options, NumberFormatInfo numfmt)
   at (float m, float b) NAPS2.Ocr.TesseractOcrEngine.GetBaselineParams(XElement element)
   at OcrResult NAPS2.Ocr.TesseractOcrEngine.CreateOcrResult(XDocument hocrDocument)
   at async Task<OcrResult> NAPS2.Ocr.TesseractOcrEngine.ProcessImage(ScanningContext scanningContext, string imagePath, OcrParams ocrParams, CancellationToken cancelToken)

The OCR job is not done at all. Also, I have checked OCR works fine when downgraded to v7.4.0.

Win10 x64 NAPS2 7.4.1

cyanfish commented 2 months ago

Do you have a sample (non-ocr'd) PDF you can attach with the problem? What OCR language are you using?

ostasevych commented 2 months ago

Do you have a sample (non-ocr'd) PDF you can attach with the problem? What OCR language are you using?

Any file which I try to OCR after scanning or after importing pdf file. I tried Ukrainian and Ukrainian+English.

cyanfish commented 2 months ago

I can't reproduce the problem, so a sample would be helpful.

zisco67 commented 2 months ago

Same here - used language is German and it occurs on every! document, so I would say, no sample needed? Downgrade solves the problem!

cyanfish commented 2 months ago

@zisco67 Do you have a sample (non-ocr'd) PDF you can attach with the problem?

I can't help if I don't know what the problem is.

cyanfish commented 2 months ago

This should be fixed in 7.4.2.

ostasevych commented 2 months ago

Hi! Thanks, it is fixed.