Error in cert-issuer "Failed validating 'pattern' in schema"

bash-4.3# cert-issuer -c /etc/cert-issuer/conf.ini
WARNING:root:Your app is configured to skip the wifi check when the USB is plugged in. Read the documentation to ensure this is what you want, since this is less secure
INFO:root:Processing 0 certificates
INFO - Processing 0 certificates
WARNING:root:No certificates to process
WARNING - No certificates to process
bash-4.3# cert-issuer -c /etc/cert-issuer/conf.ini
WARNING:root:Your app is configured to skip the wifi check when the USB is plugged in. Read the documentation to ensure this is what you want, since this is less secure
INFO:root:Processing 2 certificates
INFO - Processing 2 certificates
INFO:root:Processing 2 certificates under work path=/etc/cert-issuer/work
INFO - Processing 2 certificates under work path=/etc/cert-issuer/work
INFO:root:Signing certificates…
INFO - Signing certificates…
INFO:root:Set cost constants to recommended_tx_fee=0.000600,min_per_output=0.000028,satoshi_per_byte=250
INFO - Set cost constants to recommended_tx_fee=0.000600,min_per_output=0.000028,satoshi_per_byte=250
INFO:root:Total cost will be 133500 satoshis
INFO - Total cost will be 133500 satoshis
INFO:root:Preparing certificate batch
INFO - Preparing certificate batch
ERROR:root:‘2017-06-27T17:59:00.423120+00:00’ does not match ‘^\d{4}-[01]\d-[0-3]\d(T[0-2]\d:[0-5]\d(:[0-5]\d)?([\.,]\d{1,3})?(Z|[±][0-2]\d(:?[0-5]\d)?)?)?$’

Failed validating ‘pattern’ in schema[‘properties’][‘issuedOn’]:
{‘description’: 'Open Badges must express timestamps as strings '
'compatible with ISO 8601 guidelines, including the '
'time and a time zone indicator. It is recommended to '
'publish all timestamps in UTC. Previous versions of '
'Open Badges allowed Unix timestamps as integers. Open '
'Badges v2.0 requires string ISO 8601 values with time '
'zone indicators. For example, '
'2016-12-31T23:59:59+00:00 is a valid ISO 8601 '
'timestamp. It contains the year, month, day, T '
'separator, hour number 0-23, minute, optional seconds '
‘and decimal microsecond, and a time zone indicator ‘
’(+/- an offset from UTC or the Z designator for UTC).’,
‘pattern’: ‘^\d{4}-[01]\d-[0-3]\d(T[0-2]\d:[0-5]\d(:[0-5]\d)?([\.,]\d{1,3})?(Z|[±][0-2]\d(:?[0-5]\d)?)?)?$’,
‘type’: ‘string’}

On instance[‘issuedOn’]:
'2017-06-27T17:59:00.423120+00:00’
Traceback (most recent call last):
File “/usr/lib/python3.5/site-packages/cert_schema/schema_validator.py”, line 89, in validate_json
jsonschema.validate(certificate_json, schema_json)
File “/usr/lib/python3.5/site-packages/jsonschema/validators.py”, line 541, in validate
cls(schema, *args, **kwargs).validate(instance)
File “/usr/lib/python3.5/site-packages/jsonschema/validators.py”, line 130, in validate
raise error
jsonschema.exceptions.ValidationError: ‘2017-06-27T17:59:00.423120+00:00’ does not match ‘^\d{4}-[01]\d-[0-3]\d(T[0-2]\d:[0-5]\d(:[0-5]\d)?([\.,]\d{1,3})?(Z|[±][0-2]\d(:?[0-5]\d)?)?)?$’

Failed validating ‘pattern’ in schema[‘properties’][‘issuedOn’]:
{‘description’: 'Open Badges must express timestamps as strings '
'compatible with ISO 8601 guidelines, including the '
'time and a time zone indicator. It is recommended to '
'publish all timestamps in UTC. Previous versions of '
'Open Badges allowed Unix timestamps as integers. Open '
'Badges v2.0 requires string ISO 8601 values with time '
'zone indicators. For example, '
'2016-12-31T23:59:59+00:00 is a valid ISO 8601 '
'timestamp. It contains the year, month, day, T '
'separator, hour number 0-23, minute, optional seconds '
‘and decimal microsecond, and a time zone indicator ‘
’(+/- an offset from UTC or the Z designator for UTC).’,
‘pattern’: ‘^\d{4}-[01]\d-[0-3]\d(T[0-2]\d:[0-5]\d(:[0-5]\d)?([\.,]\d{1,3})?(Z|[±][0-2]\d(:?[0-5]\d)?)?)?$’,
‘type’: ‘string’}

On instance[‘issuedOn’]:
'2017-06-27T17:59:00.423120+00:00’
ERROR - ‘2017-06-27T17:59:00.423120+00:00’ does not match ‘^\d{4}-[01]\d-[0-3]\d(T[0-2]\d:[0-5]\d(:[0-5]\d)?([\.,]\d{1,3})?(Z|[±][0-2]\d(:?[0-5]\d)?)?)?$’

Failed validating ‘pattern’ in schema[‘properties’][‘issuedOn’]:
{‘description’: 'Open Badges must express timestamps as strings '
'compatible with ISO 8601 guidelines, including the '
'time and a time zone indicator. It is recommended to '
'publish all timestamps in UTC. Previous versions of '
'Open Badges allowed Unix timestamps as integers. Open '
'Badges v2.0 requires string ISO 8601 values with time '
'zone indicators. For example, '
'2016-12-31T23:59:59+00:00 is a valid ISO 8601 '
'timestamp. It contains the year, month, day, T '
'separator, hour number 0-23, minute, optional seconds '
‘and decimal microsecond, and a time zone indicator ‘
’(+/- an offset from UTC or the Z designator for UTC).’,
‘pattern’: ‘^\d{4}-[01]\d-[0-3]\d(T[0-2]\d:[0-5]\d(:[0-5]\d)?([\.,]\d{1,3})?(Z|[±][0-2]\d(:?[0-5]\d)?)?)?$’,
‘type’: ‘string’}

On instance[‘issuedOn’]:
'2017-06-27T17:59:00.423120+00:00’
Traceback (most recent call last):
File “/usr/lib/python3.5/site-packages/cert_schema/schema_validator.py”, line 89, in validate_json
jsonschema.validate(certificate_json, schema_json)
File “/usr/lib/python3.5/site-packages/jsonschema/validators.py”, line 541, in validate
cls(schema, *args, **kwargs).validate(instance)
File “/usr/lib/python3.5/site-packages/jsonschema/validators.py”, line 130, in validate
raise error
jsonschema.exceptions.ValidationError: ‘2017-06-27T17:59:00.423120+00:00’ does not match ‘^\d{4}-[01]\d-[0-3]\d(T[0-2]\d:[0-5]\d(:[0-5]\d)?([\.,]\d{1,3})?(Z|[±][0-2]\d(:?[0-5]\d)?)?)?$’

Failed validating ‘pattern’ in schema[‘properties’][‘issuedOn’]:
{‘description’: 'Open Badges must express timestamps as strings '
'compatible with ISO 8601 guidelines, including the '
'time and a time zone indicator. It is recommended to '
'publish all timestamps in UTC. Previous versions of '
'Open Badges allowed Unix timestamps as integers. Open '
'Badges v2.0 requires string ISO 8601 values with time '
'zone indicators. For example, '
'2016-12-31T23:59:59+00:00 is a valid ISO 8601 '
'timestamp. It contains the year, month, day, T '
'separator, hour number 0-23, minute, optional seconds '
‘and decimal microsecond, and a time zone indicator ‘
’(+/- an offset from UTC or the Z designator for UTC).’,
‘pattern’: ‘^\d{4}-[01]\d-[0-3]\d(T[0-2]\d:[0-5]\d(:[0-5]\d)?([\.,]\d{1,3})?(Z|[±][0-2]\d(:?[0-5]\d)?)?)?$’,
‘type’: ‘string’}

On instance[‘issuedOn’]:
'2017-06-27T17:59:00.423120+00:00’
Traceback (most recent call last):
File “/usr/lib/python3.5/site-packages/cert_schema/schema_validator.py”, line 89, in validate_json
jsonschema.validate(certificate_json, schema_json)
File “/usr/lib/python3.5/site-packages/jsonschema/validators.py”, line 541, in validate
cls(schema, *args, **kwargs).validate(instance)
File “/usr/lib/python3.5/site-packages/jsonschema/validators.py”, line 130, in validate
raise error
jsonschema.exceptions.ValidationError: ‘2017-06-27T17:59:00.423120+00:00’ does not match ‘^\d{4}-[01]\d-[0-3]\d(T[0-2]\d:[0-5]\d(:[0-5]\d)?([\.,]\d{1,3})?(Z|[±][0-2]\d(:?[0-5]\d)?)?)?$’

Failed validating ‘pattern’ in schema[‘properties’][‘issuedOn’]:
{‘description’: 'Open Badges must express timestamps as strings '
'compatible with ISO 8601 guidelines, including the '
'time and a time zone indicator. It is recommended to '
'publish all timestamps in UTC. Previous versions of '
'Open Badges allowed Unix timestamps as integers. Open '
'Badges v2.0 requires string ISO 8601 values with time '
'zone indicators. For example, '
'2016-12-31T23:59:59+00:00 is a valid ISO 8601 '
'timestamp. It contains the year, month, day, T '
'separator, hour number 0-23, minute, optional seconds '
‘and decimal microsecond, and a time zone indicator ‘
’(+/- an offset from UTC or the Z designator for UTC).’,
‘pattern’: ‘^\d{4}-[01]\d-[0-3]\d(T[0-2]\d:[0-5]\d(:[0-5]\d)?([\.,]\d{1,3})?(Z|[±][0-2]\d(:?[0-5]\d)?)?)?$’,
‘type’: ‘string’}

On instance[‘issuedOn’]:
‘2017-06-27T17:59:00.423120+00:00’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/bin/cert-issuer”, line 11, in
load_entry_point(‘cert-issuer==2.0b16’, ‘console_scripts’, ‘cert-issuer’)()
File “/usr/lib/python3.5/site-packages/cert_issuer/main.py”, line 17, in cert_issuer_main
issue_certificates.main(parsed_config)
File “/usr/lib/python3.5/site-packages/cert_issuer/issue_certificates.py”, line 80, in main
tx_id = issuer.issue_certificates()
File “/usr/lib/python3.5/site-packages/cert_issuer/issuer.py”, line 129, in issue_certificates
self.certificate_batch_handler.validate_batch()
File “/usr/lib/python3.5/site-packages/cert_issuer/certificate_handler.py”, line 38, in validate_batch
self.certificate_handler.validate_certificate(metadata)
File “/usr/lib/python3.5/site-packages/cert_issuer/certificate_handler.py”, line 120, in validate_certificate
validate_v2(certificate_json)
File “/usr/lib/python3.5/site-packages/cert_schema/schema_validator.py”, line 55, in validate_v2
result = validate_json(certificate_json, schema_v2)
File “/usr/lib/python3.5/site-packages/cert_schema/schema_validator.py”, line 93, in validate_json
raise BlockcertValidationError(ve)
cert_schema.BlockcertValidationError: ‘2017-06-27T17:59:00.423120+00:00’ does not match ‘^\d{4}-[01]\d-[0-3]\d(T[0-2]\d:[0-5]\d(:[0-5]\d)?([\.,]\d{1,3})?(Z|[±][0-2]\d(:?[0-5]\d)?)?)?$’

Failed validating ‘pattern’ in schema[‘properties’][‘issuedOn’]:
{‘description’: 'Open Badges must express timestamps as strings '
'compatible with ISO 8601 guidelines, including the '
'time and a time zone indicator. It is recommended to '
'publish all timestamps in UTC. Previous versions of '
'Open Badges allowed Unix timestamps as integers. Open '
'Badges v2.0 requires string ISO 8601 values with time '
'zone indicators. For example, '
'2016-12-31T23:59:59+00:00 is a valid ISO 8601 '
'timestamp. It contains the year, month, day, T '
'separator, hour number 0-23, minute, optional seconds '
‘and decimal microsecond, and a time zone indicator ‘
’(+/- an offset from UTC or the Z designator for UTC).’,
‘pattern’: ‘^\d{4}-[01]\d-[0-3]\d(T[0-2]\d:[0-5]\d(:[0-5]\d)?([\.,]\d{1,3})?(Z|[±][0-2]\d(:?[0-5]\d)?)?)?$’,
‘type’: ‘string’}

On instance[‘issuedOn’]:
'2017-06-27T17:59:00.423120+00:00’
bash-4.3# cert-issuer -c /etc/cert-issuer/conf.ini
WARNING:root:Your app is configured to skip the wifi check when the USB is plugged in. Read the documentation to ensure this is what you want, since this is less secure
INFO:root:Processing 2 certificates
INFO - Processing 2 certificates
INFO:root:Processing 2 certificates under work path=/etc/cert-issuer/work
INFO - Processing 2 certificates under work path=/etc/cert-issuer/work
INFO:root:Signing certificates…
INFO - Signing certificates…
INFO:root:Set cost constants to recommended_tx_fee=0.000600,min_per_output=0.000028,satoshi_per_byte=250
INFO - Set cost constants to recommended_tx_fee=0.000600,min_per_output=0.000028,satoshi_per_byte=250
INFO:root:Total cost will be 133500 satoshis
INFO - Total cost will be 133500 satoshis
INFO:root:Preparing certificate batch
INFO - Preparing certificate batch
ERROR:root:‘2017-06-27T17:59:00.423120+00:00’ does not match ‘^\d{4}-[01]\d-[0-3]\d(T[0-2]\d:[0-5]\d(:[0-5]\d)?([\.,]\d{1,3})?(Z|[±][0-2]\d(:?[0-5]\d)?)?)?$’

Failed validating ‘pattern’ in schema[‘properties’][‘issuedOn’]:
{‘description’: 'Open Badges must express timestamps as strings '
'compatible with ISO 8601 guidelines, including the '
'time and a time zone indicator. It is recommended to '
'publish all timestamps in UTC. Previous versions of '
'Open Badges allowed Unix timestamps as integers. Open '
'Badges v2.0 requires string ISO 8601 values with time '
'zone indicators. For example, '
'2016-12-31T23:59:59+00:00 is a valid ISO 8601 '
'timestamp. It contains the year, month, day, T '
'separator, hour number 0-23, minute, optional seconds '
‘and decimal microsecond, and a time zone indicator ‘
’(+/- an offset from UTC or the Z designator for UTC).’,
‘pattern’: ‘^\d{4}-[01]\d-[0-3]\d(T[0-2]\d:[0-5]\d(:[0-5]\d)?([\.,]\d{1,3})?(Z|[±][0-2]\d(:?[0-5]\d)?)?)?$’,
‘type’: ‘string’}

On instance[‘issuedOn’]:
'2017-06-27T17:59:00.423120+00:00’
Traceback (most recent call last):
File “/usr/lib/python3.5/site-packages/cert_schema/schema_validator.py”, line 89, in validate_json
jsonschema.validate(certificate_json, schema_json)
File “/usr/lib/python3.5/site-packages/jsonschema/validators.py”, line 541, in validate
cls(schema, *args, **kwargs).validate(instance)
File “/usr/lib/python3.5/site-packages/jsonschema/validators.py”, line 130, in validate
raise error
jsonschema.exceptions.ValidationError: ‘2017-06-27T17:59:00.423120+00:00’ does not match ‘^\d{4}-[01]\d-[0-3]\d(T[0-2]\d:[0-5]\d(:[0-5]\d)?([\.,]\d{1,3})?(Z|[±][0-2]\d(:?[0-5]\d)?)?)?$’

Failed validating ‘pattern’ in schema[‘properties’][‘issuedOn’]:
{‘description’: 'Open Badges must express timestamps as strings '
'compatible with ISO 8601 guidelines, including the '
'time and a time zone indicator. It is recommended to '
'publish all timestamps in UTC. Previous versions of '
'Open Badges allowed Unix timestamps as integers. Open '
'Badges v2.0 requires string ISO 8601 values with time '
'zone indicators. For example, '
'2016-12-31T23:59:59+00:00 is a valid ISO 8601 '
'timestamp. It contains the year, month, day, T '
'separator, hour number 0-23, minute, optional seconds '
‘and decimal microsecond, and a time zone indicator ‘
’(+/- an offset from UTC or the Z designator for UTC).’,
‘pattern’: ‘^\d{4}-[01]\d-[0-3]\d(T[0-2]\d:[0-5]\d(:[0-5]\d)?([\.,]\d{1,3})?(Z|[±][0-2]\d(:?[0-5]\d)?)?)?$’,
‘type’: ‘string’}

On instance[‘issuedOn’]:
'2017-06-27T17:59:00.423120+00:00’
ERROR - ‘2017-06-27T17:59:00.423120+00:00’ does not match ‘^\d{4}-[01]\d-[0-3]\d(T[0-2]\d:[0-5]\d(:[0-5]\d)?([\.,]\d{1,3})?(Z|[±][0-2]\d(:?[0-5]\d)?)?)?$’

Failed validating ‘pattern’ in schema[‘properties’][‘issuedOn’]:
{‘description’: 'Open Badges must express timestamps as strings '
'compatible with ISO 8601 guidelines, including the '
'time and a time zone indicator. It is recommended to '
'publish all timestamps in UTC. Previous versions of '
'Open Badges allowed Unix timestamps as integers. Open '
'Badges v2.0 requires string ISO 8601 values with time '
'zone indicators. For example, '
'2016-12-31T23:59:59+00:00 is a valid ISO 8601 '
'timestamp. It contains the year, month, day, T '
'separator, hour number 0-23, minute, optional seconds '
‘and decimal microsecond, and a time zone indicator ‘
’(+/- an offset from UTC or the Z designator for UTC).’,
‘pattern’: ‘^\d{4}-[01]\d-[0-3]\d(T[0-2]\d:[0-5]\d(:[0-5]\d)?([\.,]\d{1,3})?(Z|[±][0-2]\d(:?[0-5]\d)?)?)?$’,
‘type’: ‘string’}

On instance[‘issuedOn’]:
'2017-06-27T17:59:00.423120+00:00’
Traceback (most recent call last):
File “/usr/lib/python3.5/site-packages/cert_schema/schema_validator.py”, line 89, in validate_json
jsonschema.validate(certificate_json, schema_json)
File “/usr/lib/python3.5/site-packages/jsonschema/validators.py”, line 541, in validate
cls(schema, *args, **kwargs).validate(instance)
File “/usr/lib/python3.5/site-packages/jsonschema/validators.py”, line 130, in validate
raise error
jsonschema.exceptions.ValidationError: ‘2017-06-27T17:59:00.423120+00:00’ does not match ‘^\d{4}-[01]\d-[0-3]\d(T[0-2]\d:[0-5]\d(:[0-5]\d)?([\.,]\d{1,3})?(Z|[±][0-2]\d(:?[0-5]\d)?)?)?$’

Failed validating ‘pattern’ in schema[‘properties’][‘issuedOn’]:
{‘description’: 'Open Badges must express timestamps as strings '
'compatible with ISO 8601 guidelines, including the '
'time and a time zone indicator. It is recommended to '
'publish all timestamps in UTC. Previous versions of '
'Open Badges allowed Unix timestamps as integers. Open '
'Badges v2.0 requires string ISO 8601 values with time '
'zone indicators. For example, '
'2016-12-31T23:59:59+00:00 is a valid ISO 8601 '
'timestamp. It contains the year, month, day, T '
'separator, hour number 0-23, minute, optional seconds '
‘and decimal microsecond, and a time zone indicator ‘
’(+/- an offset from UTC or the Z designator for UTC).’,
‘pattern’: ‘^\d{4}-[01]\d-[0-3]\d(T[0-2]\d:[0-5]\d(:[0-5]\d)?([\.,]\d{1,3})?(Z|[±][0-2]\d(:?[0-5]\d)?)?)?$’,
‘type’: ‘string’}

On instance[‘issuedOn’]:
'2017-06-27T17:59:00.423120+00:00’
Traceback (most recent call last):
File “/usr/lib/python3.5/site-packages/cert_schema/schema_validator.py”, line 89, in validate_json
jsonschema.validate(certificate_json, schema_json)
File “/usr/lib/python3.5/site-packages/jsonschema/validators.py”, line 541, in validate
cls(schema, *args, **kwargs).validate(instance)
File “/usr/lib/python3.5/site-packages/jsonschema/validators.py”, line 130, in validate
raise error
jsonschema.exceptions.ValidationError: ‘2017-06-27T17:59:00.423120+00:00’ does not match ‘^\d{4}-[01]\d-[0-3]\d(T[0-2]\d:[0-5]\d(:[0-5]\d)?([\.,]\d{1,3})?(Z|[±][0-2]\d(:?[0-5]\d)?)?)?$’

Failed validating ‘pattern’ in schema[‘properties’][‘issuedOn’]:
{‘description’: 'Open Badges must express timestamps as strings '
'compatible with ISO 8601 guidelines, including the '
'time and a time zone indicator. It is recommended to '
'publish all timestamps in UTC. Previous versions of '
'Open Badges allowed Unix timestamps as integers. Open '
'Badges v2.0 requires string ISO 8601 values with time '
'zone indicators. For example, '
'2016-12-31T23:59:59+00:00 is a valid ISO 8601 '
'timestamp. It contains the year, month, day, T '
'separator, hour number 0-23, minute, optional seconds '
‘and decimal microsecond, and a time zone indicator ‘
’(+/- an offset from UTC or the Z designator for UTC).’,
‘pattern’: ‘^\d{4}-[01]\d-[0-3]\d(T[0-2]\d:[0-5]\d(:[0-5]\d)?([\.,]\d{1,3})?(Z|[±][0-2]\d(:?[0-5]\d)?)?)?$’,
‘type’: ‘string’}

On instance[‘issuedOn’]:
‘2017-06-27T17:59:00.423120+00:00’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/bin/cert-issuer”, line 11, in
load_entry_point(‘cert-issuer==2.0b16’, ‘console_scripts’, ‘cert-issuer’)()
File “/usr/lib/python3.5/site-packages/cert_issuer/main.py”, line 17, in cert_issuer_main
issue_certificates.main(parsed_config)
File “/usr/lib/python3.5/site-packages/cert_issuer/issue_certificates.py”, line 80, in main
tx_id = issuer.issue_certificates()
File “/usr/lib/python3.5/site-packages/cert_issuer/issuer.py”, line 129, in issue_certificates
self.certificate_batch_handler.validate_batch()
File “/usr/lib/python3.5/site-packages/cert_issuer/certificate_handler.py”, line 38, in validate_batch
self.certificate_handler.validate_certificate(metadata)
File “/usr/lib/python3.5/site-packages/cert_issuer/certificate_handler.py”, line 120, in validate_certificate
validate_v2(certificate_json)
File “/usr/lib/python3.5/site-packages/cert_schema/schema_validator.py”, line 55, in validate_v2
result = validate_json(certificate_json, schema_v2)
File “/usr/lib/python3.5/site-packages/cert_schema/schema_validator.py”, line 93, in validate_json
raise BlockcertValidationError(ve)
cert_schema.BlockcertValidationError: ‘2017-06-27T17:59:00.423120+00:00’ does not match ‘^\d{4}-[01]\d-[0-3]\d(T[0-2]\d:[0-5]\d(:[0-5]\d)?([\.,]\d{1,3})?(Z|[±][0-2]\d(:?[0-5]\d)?)?)?$’

Failed validating ‘pattern’ in schema[‘properties’][‘issuedOn’]:
{‘description’: 'Open Badges must express timestamps as strings '
'compatible with ISO 8601 guidelines, including the '
'time and a time zone indicator. It is recommended to '
'publish all timestamps in UTC. Previous versions of '
'Open Badges allowed Unix timestamps as integers. Open '
'Badges v2.0 requires string ISO 8601 values with time '
'zone indicators. For example, '
'2016-12-31T23:59:59+00:00 is a valid ISO 8601 '
'timestamp. It contains the year, month, day, T '
'separator, hour number 0-23, minute, optional seconds '
‘and decimal microsecond, and a time zone indicator ‘
’(+/- an offset from UTC or the Z designator for UTC).’,
‘pattern’: ‘^\d{4}-[01]\d-[0-3]\d(T[0-2]\d:[0-5]\d(:[0-5]\d)?([\.,]\d{1,3})?(Z|[±][0-2]\d(:?[0-5]\d)?)?)?$’,
‘type’: ‘string’}

On instance[‘issuedOn’]:
‘2017-06-27T17:59:00.423120+00:00’

I apologize; the cert-schema and cert-tools libraries were updated recently (end of last week), and my guess is that your cert-issuer is not using the latest cert-schema version. Can you pull the latest version of cert-issuer?

1 Like

It works well with the latest version