WebOfTrust / vLEI

Public Open Specifications for GLEIF vLEI (verifiable Legal Entity Identifiers)
Apache License 2.0
28 stars 12 forks source link

saidify-schema doesn't work with current version of keripy #84

Open jorgenavben opened 8 months ago

jorgenavben commented 8 months ago

Since the library keripy got updated from version 1.0.0 saidify-schemaschema doesn't seem to work. When you try to run it you get the following error:

➜  vLEI git:(dev) ✗ saidify-schema -f schema.json 
Traceback (most recent call last):
  File "/opt/homebrew/bin/saidify-schema", line 33, in <module>
    sys.exit(load_entry_point('vlei', 'console_scripts', 'saidify-schema')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/bin/saidify-schema", line 25, in importlib_load_entry_point
    return next(matches).load()
           ^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/metadata/__init__.py", line 205, in load
    module = import_module(match.group('module'))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/Users/jorgenavben/Downloads/vLEI/src/vlei/saidify.py", line 14, in <module>
    from vlei.app import generating
  File "/Users/jorgenavben/Downloads/vLEI/src/vlei/app/generating.py", line 4, in <module>
    def populateSAIDS(d: dict, idage: str = coring.Ids.dollar, code: str = coring.MtrDex.Blake3_256):
                                            ^^^^^^^^^^
AttributeError: module 'keri.core.coring' has no attribute 'Ids'

I have fixed the error by forcing the use of the version 1.0.0 of keripy in setup.py

It would be necessary to update the version on the setup.py file to use the version 1.0.0 of keripy or alternatively update the code of the project to adapt to the changes the newer versions of the keirpy.