text-generation-webui
text-generation-webui copied to clipboard
SuperboogaV2-chromadb/pydantic BUG
Describe the bug
chromadb-0.3.18 bug caused extension not to load, its a pydantic/pydantic-settings issue. It can be fixed by editing 'extentions/superbooga2/requirements.txt' changing chromadb version to chromadb==0.3.27
issue here: https://github.com/chroma-core/chroma/issues/774 hotfix in chromadb 0.3.27
Is there an existing issue for this?
- [X] I have searched the existing issues
Reproduction
pip 23.2.1 from miniconda3/envs/textgen/lib/python3.10/site-packages/pip (python 3.10)
- install extension requirements successfully: cd /extentions/superboogav2/, pip install -r requirements.txt
- load web-server with extension flagged
extensions:
- gallery
- complex_memory
- api
- send_pictures
- sd_api_pictures_tag_injection
- superboogav2
- code_syntax_highlight
- long_term_memory_with_qdrant
Screenshot
No response
Logs
2023-10-16 17:56:56 INFO:Loading the extension "superboogav2"...
2023-10-16 17:56:56 ERROR:Failed to load the extension "superboogav2".
Traceback (most recent call last):
File "/home/./text-generation-webui/modules/extensions.py", line 36, in load_extensions
exec(f"import extensions.{name}.script")
File "<string>", line 1, in <module>
File "/home/*/text-generation-webui/extensions/superboogav2/script.py", line 20, in <module>
from .chromadb import make_collector
File "/home/*/text-generation-webui/extensions/superboogav2/chromadb.py", line 2, in <module>
import chromadb
File "/home/*/miniconda3/envs/textgen/lib/python3.10/site-packages/chromadb/__init__.py", line 1, in <module>
import chromadb.config
File "/home/*/miniconda3/envs/textgen/lib/python3.10/site-packages/chromadb/config.py", line 1, in <module>
from pydantic import BaseSettings
File "/home/*/miniconda3/envs/textgen/lib/python3.10/site-packages/pydantic/__init__.py", line 218, in __getattr__
return _getattr_migration(attr_name)
File "/home/*/miniconda3/envs/textgen/lib/python3.10/site-packages/pydantic/_migration.py", line 294, in wrapper
raise PydanticImportError(
pydantic.errors.PydanticImportError: `BaseSettings` has been moved to the `pydantic-settings` package. See https://docs.pydantic.dev/2.4/migration/#basesettings-has-moved-to-pydantic-settings for more details.
System Info
Ubuntu Server 22.04.3 LTS, Nvidia, 2x RTX3090, Threadripper PRO 3955WX
unfortunate for me, this upgrade breaks the app, using pip 23.3 on Ubuntu22.04
(textgen) jack@irobot:~/github/text-generation-webui$ python server.py
Traceback (most recent call last):
File "/home/jack/github/text-generation-webui/server.py", line 14, in <module>
import gradio as gr
File "/home/jack/anaconda3/envs/textgen/lib/python3.11/site-packages/gradio/__init__.py", line 3, in <module>
import gradio.components as components
File "/home/jack/anaconda3/envs/textgen/lib/python3.11/site-packages/gradio/components/__init__.py", line 1, in <module>
from gradio.components.annotated_image import AnnotatedImage
File "/home/jack/anaconda3/envs/textgen/lib/python3.11/site-packages/gradio/components/annotated_image.py", line 14, in <module>
from gradio.components.base import IOComponent, _Keywords
File "/home/jack/anaconda3/envs/textgen/lib/python3.11/site-packages/gradio/components/base.py", line 20, in <module>
from fastapi import UploadFile
File "/home/jack/anaconda3/envs/textgen/lib/python3.11/site-packages/fastapi/__init__.py", line 7, in <module>
from .applications import FastAPI as FastAPI
File "/home/jack/anaconda3/envs/textgen/lib/python3.11/site-packages/fastapi/applications.py", line 15, in <module>
from fastapi import routing
File "/home/jack/anaconda3/envs/textgen/lib/python3.11/site-packages/fastapi/routing.py", line 23, in <module>
from fastapi.dependencies.models import Dependant
File "/home/jack/anaconda3/envs/textgen/lib/python3.11/site-packages/fastapi/dependencies/models.py", line 3, in <module>
from fastapi.security.base import SecurityBase
File "/home/jack/anaconda3/envs/textgen/lib/python3.11/site-packages/fastapi/security/__init__.py", line 1, in <module>
from .api_key import APIKeyCookie as APIKeyCookie
File "/home/jack/anaconda3/envs/textgen/lib/python3.11/site-packages/fastapi/security/api_key.py", line 3, in <module>
from fastapi.openapi.models import APIKey, APIKeyIn
File "/home/jack/anaconda3/envs/textgen/lib/python3.11/site-packages/fastapi/openapi/models.py", line 103, in <module>
class Schema(BaseModel):
File "/home/jack/anaconda3/envs/textgen/lib/python3.11/site-packages/pydantic/main.py", line 291, in __new__
cls.__signature__ = ClassAttribute('__signature__', generate_model_signature(cls.__init__, fields, config))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jack/anaconda3/envs/textgen/lib/python3.11/site-packages/pydantic/utils.py", line 256, in generate_model_signature
merged_params[param_name] = Parameter(
^^^^^^^^^^
File "/home/jack/anaconda3/envs/textgen/lib/python3.11/inspect.py", line 2725, in __init__
raise ValueError('{!r} is not a valid parameter name'.format(name))
ValueError: 'not' is not a valid parameter name
I have the same problem as @cognitivetech any solutions?
pip install pydantic==1.10.12
works for me, the last update of superboogav2 was 3 months ago, this is the pydantic version that was used here
pip install pydantic==1.10.12
works for me, the last update of superboogav2 was 3 months ago, this is the pydantic version that was used here
thx bro its working now!!!
Worked for me too! Thanks!
thanks
FIx pydantic version works to me too. Thanks
Confirmed works for me too. Fresh build yesterday (Sorry not sure eleius!)
This issue has been closed due to inactivity for 2 months. If you believe it is still relevant, please leave a comment below. You can tag a developer in your comment.