MRZ image not working on python code

import ocrspace
api = ocrspace.API()
api = ocrspace.API(‘here_is_my_key’, ocrspace.Language.English)


In my test it fails with OCR Engine 1, but it works fine with OCR Engine type 2:


****** Result for Image/Page 1 ******
A207614002 EGY9002269M2407186<<<<<<<<<<<<<<04

See also MRZ reading in passports


There are some errors

In first line missing a < in the second line there is a space not in original image.

can you help me how to use ocr engine 2 in python code?

Engine 2 uses exactly the same format, just add the OCREngine=2 parameter.

api = ocrspace.API(‘api_key’, ocrspace.Language.English, OCREngine=2)

is this correct?
because it is not working.