Skip to content

Commit

Permalink
Update reader.py
Browse files Browse the repository at this point in the history
The system can detect and locate the MRZ (Machine Readable Zone), but it struggles to parse it due to variations in length. Therefore, it's capable of retrieving the string from an invalid MRZ, but its inability to parse stems from the differences in length.
  • Loading branch information
imsomdev authored Feb 19, 2024
1 parent 8f8c8ff commit 4336278
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion readmrz/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def get_fields(self, code):
elif len(code) == 89:
checker = TD3CodeChecker(code)
else:
raise Exception('The MRZ code could not be detected.')
raise Exception('The MRZ code is not valid.')

# extract fields
fields = checker.fields()
Expand Down

0 comments on commit 4336278

Please sign in to comment.