open-contracting / lib-cove-oc4ids

A data review library for the Open Contracting for Infrastructure Data Standards (OC4IDS)
Other
1 stars 0 forks source link

AttributeError: 'SchemaOC4IDS' object has no attribute 'config' #20

Closed michaelwood closed 4 years ago

michaelwood commented 4 years ago

lib-cove-oc4ids is now pulling in 0.19.0 of libcove. This is currently broken by the addition of the config attribute in https://github.com/OpenDataServices/lib-cove/commit/a63cd79cb0b11374a56f6f202beb639a59adaa62

Steps to recreate:

  1. clone current lib-cove-oc4ids (HEAD 96cdf89f544556f8ee86d3408afb39da56cf917d)
  2. run libcoveoc4ids bin on a file.
Traceback (most recent call last):
  File "/home/michael/dev/ods/lib-cove-oc4ids/.ve/bin/libcoveoc4ids", line 8, in <module>
    sys.exit(main())
  File "/home/michael/dev/ods/lib-cove-oc4ids/.ve/lib/python3.8/site-packages/libcoveoc4ids/cli/__main__.py", line 17, in main
    result = libcoveoc4ids.api.oc4ids_json_output(
  File "/home/michael/dev/ods/lib-cove-oc4ids/.ve/lib/python3.8/site-packages/libcoveoc4ids/api.py", line 38, in oc4ids_json_output
    context = common_checks_oc4ids(
  File "/home/michael/dev/ods/lib-cove-oc4ids/.ve/lib/python3.8/site-packages/libcoveoc4ids/common_checks.py", line 12, in common_checks_oc4ids
    common_checks = common_checks_context(upload_dir, json_data, schema_obj,
  File "/home/michael/dev/ods/lib-cove-oc4ids/.ve/lib/python3.8/site-packages/libcove/lib/common.py", line 433, in common_checks_context
    validation_errors = get_schema_validation_errors(
  File "/home/michael/dev/ods/lib-cove-oc4ids/.ve/lib/python3.8/site-packages/libcove/lib/common.py", line 639, in get_schema_validation_errors
    config=schema_obj.config,
AttributeError: 'SchemaOC4IDS' object has no attribute 'config'

Workaround: Downgrade libcove to 0.18.0 pip install libcove==0.18.0