brucepro / Memoir

Memoir+ a persona extension for Text Gen Web UI. That includes memory, emotions, command handling and more.
MIT License
143 stars 15 forks source link

requirements #29

Closed seth225 closed 1 month ago

seth225 commented 2 months ago

I had previously installed and used Memoir and it worked perfectly, but I have had to make a new install of OogaBooga and am now having problems setting up Memoir. I have docker installed on my machine and Ooga Booga is set up functionally. git clone https://github.com/brucepro/Memoir works perfectly, as does pip install -r requirements.txt, and also pip install -r extensions\Memoir\requirements.txt --upgrade. All requirements already met. However when I go to load in Memoir I get the following : 08:14:39-465739 ERROR Could not import the requirements for 'Memoir'. Make sure to install the requirements for the extension.

I seem to recall a docker file having been created on my previous install, but I do not see this occurring on this most recent install. I notice on step 2 of your installation instructions it says ...... If for some reason you cannot load docker, you can bypass it by installing qdrant binary (https://github.com/qdrant/qdrant/releases) You can then comment out the docker loads in startup of script.py.

Is this the solution that I require? I am not particularly tech savvy, but I can follow concise directions. Can you please offer some detailed directions on how to get this wonderful extension up and running? Thanks for the effort and for the support.

brucepro commented 2 months ago

Will take a look. Docker file for qdrant should be there. Can you try using the dev branch?

CravenEsq commented 2 months ago

@seth225 You can manually run the docker container using the qdrant-docker-compose.yml present in the directory by using the following command in the Memoir directory itself:

docker compose -f qdrant-docker.compose.yml up

However, I too am finding issues with the requirements, despite having installed them:

11:58:24-289179 INFO     Loading the extension "gallery"
11:58:24-291155 INFO     Loading the extension "long_replies"
11:58:24-291893 INFO     Loading the extension "send_pictures"
11:58:24-292871 INFO     Loading the extension "Memoir"
11:58:24-296870 ERROR    Could not import the requirements for 'Memoir'. Make sure to install the requirements for the
                         extension.

* To install requirements for all available extensions, launch the
update_wizard script for your OS and choose the B option.

* To install the requirements for this extension alone, launch the
cmd script for your OS and paste the following command in the
terminal window that appears:

Linux / Mac:

pip install -r extensions/Memoir/requirements.txt --upgrade

Windows:

pip install -r extensions\Memoir\requirements.txt --upgrade

11:58:24-308870 ERROR    Failed to load the extension "Memoir".
Traceback (most recent call last):
  File "G:\TextGenerationWebUI\modules\extensions.py", line 37, in load_extensions
    extension = importlib.import_module(f"extensions.{name}.script")
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "G:\TextGenerationWebUI\installer_files\env\Lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "G:\TextGenerationWebUI\extensions\Memoir\script.py", line 23, in <module>
    from python_on_whales import DockerClient
ModuleNotFoundError: No module named 'python_on_whales'

Running the install command again simply tells me the package is already present.

Added the PATH to the correct Python directories, removed the packages and re-installed them again just in case, but to no avail.

Will keep looking into it this issue and in case I find something I'll post it here.

CravenEsq commented 2 months ago

Didn't take long apparently, here's the solution that helped me:

  1. Run update_wizard_windows.bat inside the text-generation-webui main directory.
  2. Choose option B: Install/update extensions requirements
  3. Choose Memoir

Not sure why this particular route did the trick, but Memoir seems to load in just fine now without any requirement errors.

Hope this helps you or anyone else with the same issue!

seth225 commented 2 months ago

Ok sorry it has taken so long to respond. Still not working.

Tried everything. Reinstalled webui. Updated webui via update-wizard-windows.bat and by command prompt. Installed Memoir requirements via the update-wizard-windows.bat, and also via command prompt pip install -r extensions/Memoir/requirements.txt --upgrade. Ran docker successfully via docker compose -f qdrant-docker-compose.yml up.

E:\text-generation-webui\extensions\Memoir>docker-compose -f E:\text-generation-webui\extensions\Memoir\qdrant-docker-compose.yml up [+] Running 1/0 ✔ Container webui_memoir_qdrant Created 0.0s Attaching to webui_memoir_qdrant webui_memoirqdrant | _ webui_memoir_qdrant | _ _| | | |_ webui_memoirqdrant | / |/ _ | '/ ` | ' | | webui_memoirqdrant | | (| | (| | | | (| | | | | |_ webui_memoirqdrant | _, |_,|| _,|| ||_| webui_memoirqdrant | || webui_memoir_qdrant | webui_memoir_qdrant | Version: 1.8.4, build: 984f55d6 webui_memoir_qdrant | Access web UI at http://localhost:6333/dashboard webui_memoir_qdrant | webui_memoir_qdrant | 2024-04-22T11:37:12.944096Z INFO storage::content_manager::consensus::persistent: Loading raft state from ./storage/raft_state.json webui_memoir_qdrant | 2024-04-22T11:37:13.019305Z INFO qdrant: Distributed mode disabled webui_memoir_qdrant | 2024-04-22T11:37:13.019357Z INFO qdrant: Telemetry reporting enabled, id: 6441da30-1fb1-4520-af83-65f0cf4787d9 webui_memoir_qdrant | 2024-04-22T11:37:13.028022Z INFO qdrant::actix: TLS disabled for REST API webui_memoir_qdrant | 2024-04-22T11:37:13.028336Z INFO qdrant::actix: Qdrant HTTP listening on 6333 webui_memoir_qdrant | 2024-04-22T11:37:13.028360Z INFO actix_server::builder: Starting 15 workers webui_memoir_qdrant | 2024-04-22T11:37:13.028369Z INFO actix_server::server: Actix runtime found; starting in Actix runtime webui_memoir_qdrant | 2024-04-22T11:37:13.032130Z INFO qdrant::tonic: Qdrant gRPC listening on 6334 webui_memoir_qdrant | 2024-04-22T11:37:13.032162Z INFO qdrant::tonic: TLS disabled for gRPC API

This is what I get...

08:28:39-500202 INFO Loading the extension "gallery" 08:28:39-503203 INFO Loading the extension "Memoir" 08:28:48-321435 ERROR Could not import the requirements for 'Memoir'. Make sure to install the requirements for the extension.

                     * To install requirements for all available extensions, launch the
                       update_wizard script for your OS and choose the B option.

                     * To install the requirements for this extension alone, launch the
                       cmd script for your OS and paste the following command in the
                       terminal window that appears:

                     Linux / Mac:

                     pip install -r extensions/Memoir/requirements.txt --upgrade

                     Windows:

                     pip install -r extensions\Memoir\requirements.txt --upgrade

08:28:48-332445 ERROR Failed to load the extension "Memoir". Traceback (most recent call last): File "E:\text-generation-webui\modules\extensions.py", line 37, in load_extensions extension = importlib.import_module(f"extensions.{name}.script") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\text-generation-webui\installer_files\env\Lib\importlib__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "E:\text-generation-webui\extensions\Memoir\script.py", line 27, in from extensions.Memoir.commandhandler import CommandHandler File "E:\text-generation-webui\extensions\Memoir\commandhandler.py", line 7, in from extensions.Memoir.commands.urlhandler import UrlHandler File "E:\text-generation-webui\extensions\Memoir\commands\urlhandler.py", line 2, in from bs4 import BeautifulSoup ModuleNotFoundError: No module named 'bs4'

Running on local URL: http://127.0.0.1:7860

Any help is appreciated. This extension looks great and I would love to use it. Thanks.

brucepro commented 2 months ago

Try commenting out the bs4 import from the command handler.

brucepro commented 2 months ago

Urlhandler even

brucepro commented 2 months ago

Try pip install BeautifulSoup4 in the env