ParisNeo / lollms

Lord of LLMS
Apache License 2.0
270 stars 51 forks source link

lollms-settings throws error when trying to run #2

Open d13g4 opened 1 year ago

d13g4 commented 1 year ago

Error

Traceback (most recent call last): File "/home/$user/lollms/venv/bin/lollms-settings", line 33, in sys.exit(load_entry_point('lollms==2.2.0', 'console_scripts', 'lollms-settings')()) File "/home/$user/lollms/venv/bin/lollms-settings", line 25, in importlib_load_entry_point return next(matches).load() File "/usr/lib/python3.10/importlib/metadata/init.py", line 171, in load module = import_module(match.group('module')) File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/home/$user/lollms/venv/lib/python3.10/site-packages/lollms-2.2.0-py3.10.egg/lollms/apps/settings/init.py", line 16, in class Settings(LollmsApplication): File "/home/$user/lollms/venv/lib/python3.10/site-packages/lollms-2.2.0-py3.10.egg/lollms/apps/settings/init.py", line 123, in Settings def safe_generate(self, full_discussion:str, n_predict=None, callback: Callable[[str, int, dict], bool]=None): NameError: name 'Callable' is not defined. Did you mean: 'callable'?

Further explaination

As one can see it was run out of a venv (and from the main branch of git). It was not my first try, I tried it as described in the Readme with the same error. Then with pip from the git as described with the same error. Then I tried it out of a venv and manually from the git.

Edit: lollms-webui runs without problems on the same machine with the same user (saw the youtube-video where the server-client concept was explained and wanted to do that)

ParisNeo commented 1 year ago

Hi. I'll check this when I come back home. I am on vacation these days and got no pc. The error looks like a missing import Ckeck that there is something like:

from typing import Callable

If you don't find it, then add it and try again. Also this is a relatively new thing, you need python 3.10 or higher. I don't remember having this error, but maybe I didn't see it. Or forgot the import in last update or worse, i may have forgotten to push my last commits. Sorry, vacation took me by surprise as I didn't have real vacation for long time.