-
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
Python 3.11: re.error: global flags not at the start of the expression at position 3 #91
Comments
This does indeed not happen with Python 3.10.12. |
It's a problem in calamari-ocr, not ocrd_calamari:
calamari-ocr 1.0.6 |
This took me a while to find. The problem lies in the regexen defined in the model! E.g.
|
Fixing the regexen in Q&D script to fix the model:
|
master now includes the above script as
This (or something equivalent) should probably go into Calamari's 1.0 branch. |
|
I've opened an issue upstream: Calamari-OCR/calamari#348 |
And a PR against calamari/1.0 branch that fixes the issue: Calamari-OCR/calamari#349 |
This issue should be enough for documentation, especially since nobody else uses 3.11 yet (fingers crossed). The fix is merged upstream and having a new release is tracked in #94. |
Possibly a problem only with Python 3.11:
Python 3.11 changelog seems to support this assumption.
(This would have been nice to have been caught early, using a linter. → Opening another issue.)
The text was updated successfully, but these errors were encountered: