Skip to content
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

Problem validating BODS json without a 'statementDate' #20

Closed
kd-ods opened this issue May 29, 2019 · 1 comment
Closed

Problem validating BODS json without a 'statementDate' #20

kd-ods opened this issue May 29, 2019 · 1 comment

Comments

@kd-ods
Copy link
Collaborator

kd-ods commented May 29, 2019

statementDate is not a required field. When I run this example file (4a-simple-pep-declaration.json) through CoVE, I get the following error:

Traceback (most recent call last):
  File "/home/kadie/code/lib-cove-bods/.ve/bin/libcovebods", line 11, in <module>
    load_entry_point('libcovebods', 'console_scripts', 'libcovebods')()
  File "/home/kadie/code/lib-cove-bods/libcovebods/cli/__main__.py", line 19, in main
    file_type='json'
  File "/home/kadie/code/lib-cove-bods/libcovebods/api.py", line 38, in bods_json_output
    common_checks_bods(context, output_dir, json_data, schema_bods, lib_cove_bods_config=lib_cove_bods_config)
  File "/home/kadie/code/lib-cove-bods/libcovebods/common_checks.py", line 18, in common_checks_bods
    'statistics': get_statistics(json_data),
  File "/home/kadie/code/lib-cove-bods/libcovebods/lib/common_checks.py", line 79, in get_statistics
    year = int(statement['statementDate'].split('-')[0])
KeyError: 'statementDate'
@ScatteredInk
Copy link
Collaborator

This is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants