-
Notifications
You must be signed in to change notification settings - Fork 123
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
Bug in parsing passport with only one name #1
Comments
Yes, it's correct. That should not happen. As ICAO 9303-3 3.4 says: So I think that the right thing to do, in case of getting only one identifier, would be to report it as a warning. Also, thanks to your report, I discovered that something similar happens in mrz.generator. When the primary identifier is not given, an incorrect output is got. For example: from mrz.generator.td3 import TD3CodeGenerator
print(TD3CodeGenerator("P", # Document type
"Utopia", # Country
"", # Surname(s)
"Anna María", # Given name(s)
"L898902C3", # Passport number
"UTO", # Nationality
"740812", # Birth date
"F", # Genre
"120415", # Expiry date
"ZE184226B")) # Id number This wrong output is got:
Next week I'll work to try to fix it Thank you very much for your feedback |
Thanks, |
@tahajahangir , hi again! _fields method at the beginning was very simple... then, little by little, I added more checks. That's why it had several errors. I almost rewritten it from scratch. I've tested it again and I think it works fine now, but if you find something wrong, I would appreciate it if you told me Thank you so much! PS: I have created a new issue with the 2nd problem you have reported. |
Some passports (TD3 MRZ) have only one name, like:
or
TD3CodeChecker(value)
for this input fails with this exception:The text was updated successfully, but these errors were encountered: