yushulx / python-mrz-scanner-sdk

Python MRZ scanner SDK built with Dynamsoft Label Recognizer
https://pypi.org/project/mrz-scanner-sdk/
MIT License
5 stars 0 forks source link

Consider adding making decodeMatAsync asyncio compliant #2

Open SimonSchick opened 1 year ago

SimonSchick commented 1 year ago

The current callback pattern is somewhat counter-intuitive and crashes the python runtime when no handler is registered.

image
yushulx commented 1 year ago

@SimonSchick the async method is implemented in C++ thread. It is not an asynchronous coroutine.

SimonSchick commented 1 year ago

I understand that, my suggestion is to add it as an alternative and/or change the api. Plus it most certainly shouldn't be able to crash the python runtime :)

yushulx commented 1 year ago

@SimonSchick can you share your code? I can't reproduce your error.

SimonSchick commented 1 year ago

I'm rather certain I added the sample to my main post as an edit, it seems it hasn't gone through. Will update soon.