NASA-IMPACT / pyQuARC

The pyQuARC tool reads and evaluates metadata records with a focus on the consistency and robustness of the metadata. pyQuARC flags opportunities to improve or add to contextual metadata information in order to help the user connect to relevant data products. pyQuARC also ensures that information common to both the data product and the file-level metadata are consistent and compatible. pyQuARC frees up human evaluators to make more sophisticated assessments such as whether an abstract accurately describes the data and provides the correct contextual information. The base pyQuARC package assesses descriptive metadata used to catalog Earth observation data products and files. As open source software, pyQuARC can be adapted and customized by data providers to allow for quality checks that evolve with their needs, including checking metadata not covered in base package.
Apache License 2.0
19 stars 0 forks source link

Error validating DIF10 record #167

Closed cgokey closed 2 years ago

cgokey commented 2 years ago

Describe the bug I'm getting an error validating the following DIF10 document, see attached. See below for the stack trace. Looks like there is a issue parsing url content type.

Traceback (most recent call last): File "/Users/cgokey/Developer/rails/cmr-metadata-review/lib/dashboard_checker.py", line 87, in validation_results = arc.validate() File "/Users/cgokey/Developer/rails/cmr-metadata-review/lib/pyQuARC.egg/pyQuARC/main.py", line 158, in validate validation_errors = checker.run(content) File "/Users/cgokey/Developer/rails/cmr-metadata-review/lib/pyQuARC.egg/pyQuARC/code/checker.py", line 226, in run result_custom = self.perform_custom_checks(json_metadata) File "/Users/cgokey/Developer/rails/cmr-metadata-review/lib/pyQuARC.egg/pyQuARC/code/checker.py", line 209, in perform_custom_checks self._run_func(func, check, rule_id, metadata_content, result_dict) File "/Users/cgokey/Developer/rails/cmr-metadata-review/lib/pyQuARC.egg/pyQuARC/code/checker.py", line 177, in _run_func result = self.custom_checker.run( File "/Users/cgokey/Developer/rails/cmr-metadata-review/lib/pyQuARC.egg/pyQuARC/code/custom_checker.py", line 106, in run func_return = func(*function_args) File "/Users/cgokey/Developer/rails/cmr-metadata-review/lib/pyQuARC.egg/pyQuARC/code/custom_validator.py", line 195, in get_data_url_check if (url_type := url.get('URL_Content_Type', {}).get('Type')) and \ AttributeError: 'str' object has (https://github.com/NASA-IMPACT/pyQuARC/files/8161029/C1206487504-ASF.txt) no attribute 'get' [C1206487504-ASF.txt]