nickprock / sbert-integration

5 stars 0 forks source link

[Error]local variable 'settings' referenced before assignment. Unable to load plugin sbert_integration #1

Closed dedalo944 closed 4 months ago

dedalo944 commented 4 months ago

Describe the bug (cheshire_cat_core | [2024-06-07 12:14:38.098] ERROR cat.mad_hatter.plugin.Plugin._load_decorated_functions::309 cheshire_cat_core | "Error in cat.plugins.sbert_integration.sbert-integration: local variable 'settings' referenced before assignment. Unable to load plugin sbert_integration" cheshire_cat_core | [2024-06-07 12:14:38.137] WARNING cat.mad_hatter.plugin.Plugin._load_decorated_functions::310 cheshire_cat_core | "To resolve any problem related to Sbert-Integration plugin, contact the creator using github issue at the link https://github.com/nickprock/sbert-integration" cheshire_cat_core | Traceback (most recent call last): cheshire_cat_core | File "/app/cat/mad_hatter/plugin.py", line 302, in _load_decorated_functions cheshire_cat_core | plugin_module = importlib.import_module(py_filename) cheshire_cat_core | File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module cheshire_cat_core | return _bootstrap._gcd_import(name[level:], package, level) cheshire_cat_core | File "<frozen importlib._bootstrap>", line 1050, in _gcd_import cheshire_cat_core | File "<frozen importlib._bootstrap>", line 1027, in _find_and_load cheshire_cat_core | File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked cheshire_cat_core | File "<frozen importlib._bootstrap>", line 688, in _load_unlocked cheshire_cat_core | File "<frozen importlib._bootstrap_external>", line 883, in exec_module cheshire_cat_core | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed cheshire_cat_core | File "/app/cat/plugins/sbert_integration/sbert-integration.py", line 28, in <module> cheshire_cat_core | settings = get_settings() cheshire_cat_core | File "/app/cat/plugins/sbert_integration/sbert-integration.py", line 14, in get_settings cheshire_cat_core | return settings cheshire_cat_core | UnboundLocalError: local variable 'settings' referenced before assignment)

To Reproduce Install the latest version of the plugin, wait requirments install, error. image

nickprock commented 4 months ago

Hi @dedalo944 , I removed the matryoshka support and now the plugin should work. On my linux system I can't recreate the bug, I tried on Windows and I have the bug, I must go in deep.

nickprock commented 4 months ago

Now it works, thanks @dedalo944 for the issue and the help!