Closed yaser-fyndiq closed 4 weeks ago
I'm on vacation right now, but will get back to you on this one once I'm back.
I've release Biip 3.3.0 with a fix for this issue.
>>> from pprint import pprint
>>> import biip
>>> pprint(biip.parse("701197206489"))
ParseResult(value='701197206489',
symbology_identifier=None,
gtin=Gtin(value='701197206489',
format=GtinFormat.GTIN_12,
prefix=GS1Prefix(value='070', usage='GS1 US'),
company_prefix=GS1CompanyPrefix(value='0701197'),
payload='70119720648',
check_digit=9,
packaging_level=None),
gtin_error=None,
upc=Upc(value='701197206489',
format=UpcFormat.UPC_A,
number_system_digit=7,
payload='70119720648',
check_digit=9),
upc_error=None,
sscc=None,
sscc_error="Failed to parse '701197206489' as SSCC: Expected 18 "
'digits, got 12.',
gs1_message=None,
gs1_message_error='Failed to parse GS1 AI (7011) date/time from '
"'972064'.")
Awesome work @jodal. Thank you!
Hello,
I tried parsing the same gtin value in 3.1.0 and 3.2.0 and it seems that 3.2.0 is raising an unhandled exception. Maybe this is related to https://github.com/jodal/biip/pull/292?
With
3.1.0
, it's working fine:With
3.2.0
, it's raisingTypeError