wwaites / saved_fisdat

SAVED project - data processing tools for fish farms
3 stars 0 forks source link

AttributeError: type object 'Draft201909Validator' has no attribute 'FORMAT_CHECKER' #12

Open tomadams-ssf opened 1 month ago

tomadams-ssf commented 1 month ago

Error when running a test example using fisdat.

System: Windows 10 v 22H2 Python 3.10.4 linkml==1.7.10 linkml-dataops==0.1.0 linkml-runtime==1.7.5

$ fisdat density.yaml density.csv manifest1.yaml C:\Users\tadams\OneDrive - Scottish Sea Farms\Documents\projects\202312_SAVED\saved_fisdat\fisdat\datamodel.py:371: FutureWarning: Possible nested set at position 10 pattern=re.compile(r'^:?[a-z]+[[a-z]||]*$')) WARNING [2024-05-24 15:16:35,089] [term.py'new' (l.287)] C:\Users\tadams\AppData\Local\Programs\Python\Python310\lib\site-packages\linkml_runtime\linkml_model\model\schema\types does not look like a valid URI, trying to serialize this will break.'' WARNING [2024-05-24 15:16:35,462] [`term.py' `__new__' (l.287)]C:\Users\tadams\AppData\Local\Programs\Python\Python310\lib\site-packages\linkml_runtime\linkml_model\model\schema\types does not look like a valid URI, trying to serialize this will break.'' Traceback (most recent call last): File "C:\Users\tadams\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\tadams\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "C:\Users\tadams\AppData\Local\Programs\Python\Python310\Scripts\fisdat.exe__main__.py", line 7, in File "C:\Users\tadams\OneDrive - Scottish Sea Farms\Documents\projects\202312_SAVED\saved_fisdat\fisdat\cmd_dat.py", line 315, in cli manifest_wrapper (data = args.csvfile File "C:\Users\tadams\OneDrive - Scottish Sea Farms\Documents\projects\202312_SAVED\saved_fisdat\fisdat\cmd_dat.py", line 224, in manifest_wrapper validation_check = validation_helper (data, schema, "TableSchema") File "C:\Users\tadams\OneDrive - Scottish Sea Farms\Documents\projects\202312_SAVED\saved_fisdat\fisdat\utils.py", line 44, in validation_helper report = validate_file (data, schema, target_class, strict = True) File "C:\Users\tadams\AppData\Local\Programs\Python\Python310\lib\site-packages\linkml\validator__init__.py", line 113, in validate_file return validator.validate_source(loader, target_class) File "C:\Users\tadams\AppData\Local\Programs\Python\Python310\lib\site-packages\linkml\validator\validator.py", line 68, in validate_source return ValidationReport(results=list(self.iter_results_from_source(loader, target_class))) File "C:\Users\tadams\AppData\Local\Programs\Python\Python310\lib\site-packages\linkml\validator\validator.py", line 107, in iter_results_from_source for result in plugin.process(instance, context): File "C:\Users\tadams\AppData\Local\Programs\Python\Python310\lib\site-packages\linkml\validator\plugins\jsonschema_validation_plugin.py", line 43, in process validator = context.json_schema_validator( File "C:\Users\tadams\AppData\Local\Programs\Python\Python310\lib\site-packages\linkml\validator\validation_context.py", line 56, in json_schema_validator return validator_cls(json_schema, format_checker=validator_cls.FORMAT_CHECKER) AttributeError: type object 'Draft201909Validator' has no attribute 'FORMAT_CHECKER' This is fisdat version 0.5+4.g9f4151c, commit 9f4151c670e272f7af56663603b70bd73b7d52e6

When I run the same thing on a remote (Windows Server 10 Standard v 1809, Python 3.10.9) machine - after updating to latest version of fisdat etc, it still warns about the URIs but doesn't fail. Linkml versions match those above.

D:\OneDrive Profiles\Tom\OneDrive - Scottish Sea Farms\Documents\projects\202312_SAVED\saved_fisdat\fisdat\datamodel.py:371: FutureWarning: Possible nested set at position 10 pattern=re.compile(r'^:?[a-z]+[[a-z]||]*$')) WARNING [2024-05-24 15:50:26,016] [term.py'new' (l.287)] D:\ProgramData\TAdams\miniconda3\lib\site-packages\linkml_runtime\linkml_model\model\schema\types does not look like a valid URI, trying to serialize this will break.'' WARNING [2024-05-24 15:50:26,420] [`term.py' `__new__' (l.287)]D:\ProgramData\TAdams\miniconda3\lib\site-packages\linkml_runtime\linkml_model\model\schema\types does not look like a valid URI, trying to serialize this will break.'' This is fisdat version 0.5+4.g9f4151c, commit 9f4151c670e272f7af56663603b70bd73b7d52e6 Wrote to manifest.yaml:

| data URI | data schema | data hash |

| density.csv | density.yaml | 817813d04 |

druimalban commented 1 month ago

Thanks for that, and I got your other email.

I will test this next week on a Windows laptop and see if I can reproduce it.