-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: module 'numpy' has no attribute 'str'. #87
Comments
The deprecation of Until we can update to Calamari 2, I'll require NumPy < 1.24.0 as a workaround. |
NumPy has deprecated np.str (etc.) since NumPy 1.20, and since Numpy 1.24 throws an error. We can't currently update to Calamari 2 (and fix the problem there if necessary), so stick to NumPy 1.23.x for now. #87
Managed to get it to work, using numpy 1.23.5. CircleCI is still failing. |
The filename of the created file seems to have changed in OCR-D so the tests fail. I'm correcting it. (This is unrelated to the NumPy problem. But illustrates why scheduled tests seems to be useful.) |
Note: on |
Thanks for making me aware of this open issue again! I will look into it! Is there an urgent issue in ocrd_all with no working workaround? |
Also note Calamari-OCR/calamari#341, which hopefully will be enough to make ocrd_calamari 1.0.5 (before the workarounds) work out of the box.
I would say that 2.x support is quite urgent (because most/best models are trained on 2.x). Given that Calamari 2.x now has good native PAGE support, this should actually be easy IIUC. We have 2 workarounds for that:
But in both cases we loose any information below the line level including confidence, and we get no model provenance here). Also, with these recipes we cannot use the regular specialised workflow formats. |
Moving this to #61. |
This has now happened: there is a new calamari-ocr==1.0.6 which already takes care of the Numpy and Protobuf problems, so you could rewrite ocrd_calamari to basically what we had before these workarounds and release a |
Older Calamari version had used deprecated np.str, remove the workaround for this and require Calamari >= 1.0.6 instead. See #87.
Removing the numpy workaround now as it seems to be fixed in calamari-ocr indeed. I get another warning though using Python 3.11 and the latest numpy... Need to investigate.
|
This issue can be closed. There's
|
Using
I get this error:
The text was updated successfully, but these errors were encountered: