oobabooga / text-generation-webui

A Gradio web UI for Large Language Models.
GNU Affero General Public License v3.0
40.85k stars 5.34k forks source link

Pydantic errors - (I'm a newbie) #6367

Open Meteorfire7 opened 2 months ago

Meteorfire7 commented 2 months ago

Describe the bug

Hi, to start off I thank anyone who trie to help me in any way.

So, I was trying to open Oobabooga for the first time: I let it download and install everything, I put the right GPU (I have a RTX 2070 super so I put Nvidia and then I respond 'N'), Then downloads and installations and then it runs. I put the IP on my browser and the console gives me a bunch of errors and the WebUI too, basically I can't do anything because it says "Connection errored out." every time I click or type something.

I never used this type of things so sorry for any type of incorrect terms. You can find anything you need in the files (mind the names of them).

Errors in the WebUI Console AFTER opening the IP in the browser Console BEFORE opening the IP in the browser Every error that pops up on the console AFTER putting the IP in the browser.txt

Is there an existing issue for this?

Reproduction

Screenshot

Errors in the WebUI Console AFTER opening the IP in the browser Console BEFORE opening the IP in the browser

Logs

ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\type_adapter.py", line 279, in _init_core_attrs
    self._core_schema = _getattr_no_parents(self._type, '__pydantic_core_schema__')
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\type_adapter.py", line 121, in _getattr_no_parents
    raise AttributeError(attribute)
AttributeError: __pydantic_core_schema__

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 406, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 70, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\applications.py", line 113, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\middleware\errors.py", line 187, in __call__
    raise exc
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\middleware\errors.py", line 165, in __call__
    await self.app(scope, receive, _send)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\route_utils.py", line 695, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\route_utils.py", line 711, in simple_response
    await self.app(scope, receive, send)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\middleware\exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 62, in wrapped_app
    raise exc
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 51, in wrapped_app
    await app(scope, receive, sender)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 715, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 735, in app
    await route.handle(scope, receive, send)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 288, in handle
    await self.app(scope, receive, send)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 76, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 62, in wrapped_app
    raise exc
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 51, in wrapped_app
    await app(scope, receive, sender)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 73, in app
    response = await f(request)
               ^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\routing.py", line 291, in app
    solved_result = await solve_dependencies(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\dependencies\utils.py", line 639, in solve_dependencies
    ) = await request_body_to_args(  # body_params checked above
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\dependencies\utils.py", line 810, in request_body_to_args
    fields_to_extract = get_model_fields(first_field.type_)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\_compat.py", line 283, in get_model_fields
    return [
           ^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\_compat.py", line 284, in <listcomp>
    ModelField(field_info=field_info, name=name)
  File "<string>", line 6, in __init__
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\_compat.py", line 109, in __post_init__
    self._type_adapter: TypeAdapter[Any] = TypeAdapter(
                                           ^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\type_adapter.py", line 266, in __init__
    self._init_core_attrs(rebuild_mocks=False)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\type_adapter.py", line 144, in wrapped
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\type_adapter.py", line 286, in _init_core_attrs
    self._core_schema = _get_schema(self._type, config_wrapper, parent_depth=self._parent_depth)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\type_adapter.py", line 104, in _get_schema
    schema = gen.generate_schema(type_)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 655, in generate_schema
    schema = self._generate_schema_inner(obj)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 908, in _generate_schema_inner
    return self._annotated_schema(obj)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 2025, in _annotated_schema
    schema = self._apply_annotations(source_type, annotations)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 2104, in _apply_annotations
    schema = get_inner_schema(source_type)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_schema_generation_shared.py", line 83, in __call__
    schema = self._handler(source_type)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 2186, in new_handler
    schema = metadata_get_schema(source, get_inner_schema)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 2182, in <lambda>
    lambda source, handler: handler(source)
                            ^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_schema_generation_shared.py", line 83, in __call__
    schema = self._handler(source_type)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 2085, in inner_handler
    schema = self._generate_schema_inner(obj)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 929, in _generate_schema_inner
    return self.match_type(obj)
           ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 1029, in match_type
    return self._match_generic_type(obj, origin)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 1058, in _match_generic_type
    return self._union_schema(obj)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 1378, in _union_schema
    choices.append(self.generate_schema(arg))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 655, in generate_schema
    schema = self._generate_schema_inner(obj)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 929, in _generate_schema_inner
    return self.match_type(obj)
           ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 1038, in match_type
    return self._unknown_type_schema(obj)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 558, in _unknown_type_schema
    raise PydanticSchemaGenerationError(
pydantic.errors.PydanticSchemaGenerationError: Unable to generate pydantic-core schema for <class 'starlette.requests.Request'>. Set `arbitrary_types_allowed=True` in the model_config to ignore this error or implement `__get_pydantic_core_schema__` on your type to fully support it.

If you got this error by calling handler(<some type>) within `__get_pydantic_core_schema__` then you likely need to call `handler.generate_schema(<some type>)` since we do not call `__get_pydantic_core_schema__` on `<some type>` otherwise to avoid infinite recursion.

For further information visit https://errors.pydantic.dev/2.9/u/schema-for-unknown-type
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\type_adapter.py", line 279, in _init_core_attrs
    self._core_schema = _getattr_no_parents(self._type, '__pydantic_core_schema__')
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\type_adapter.py", line 121, in _getattr_no_parents
    raise AttributeError(attribute)
AttributeError: __pydantic_core_schema__

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 406, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 70, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\applications.py", line 113, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\middleware\errors.py", line 187, in __call__
    raise exc
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\middleware\errors.py", line 165, in __call__
    await self.app(scope, receive, _send)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\route_utils.py", line 695, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\route_utils.py", line 711, in simple_response
    await self.app(scope, receive, send)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\middleware\exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 62, in wrapped_app
    raise exc
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 51, in wrapped_app
    await app(scope, receive, sender)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 715, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 735, in app
    await route.handle(scope, receive, send)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 288, in handle
    await self.app(scope, receive, send)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 76, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 62, in wrapped_app
    raise exc
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 51, in wrapped_app
    await app(scope, receive, sender)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 73, in app
    response = await f(request)
               ^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\routing.py", line 291, in app
    solved_result = await solve_dependencies(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\dependencies\utils.py", line 639, in solve_dependencies
    ) = await request_body_to_args(  # body_params checked above
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\dependencies\utils.py", line 810, in request_body_to_args
    fields_to_extract = get_model_fields(first_field.type_)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\_compat.py", line 283, in get_model_fields
    return [
           ^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\_compat.py", line 284, in <listcomp>
    ModelField(field_info=field_info, name=name)
  File "<string>", line 6, in __init__
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\_compat.py", line 109, in __post_init__
    self._type_adapter: TypeAdapter[Any] = TypeAdapter(
                                           ^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\type_adapter.py", line 266, in __init__
    self._init_core_attrs(rebuild_mocks=False)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\type_adapter.py", line 144, in wrapped
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\type_adapter.py", line 286, in _init_core_attrs
    self._core_schema = _get_schema(self._type, config_wrapper, parent_depth=self._parent_depth)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\type_adapter.py", line 104, in _get_schema
    schema = gen.generate_schema(type_)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 655, in generate_schema
    schema = self._generate_schema_inner(obj)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 908, in _generate_schema_inner
    return self._annotated_schema(obj)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 2025, in _annotated_schema
    schema = self._apply_annotations(source_type, annotations)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 2104, in _apply_annotations
    schema = get_inner_schema(source_type)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_schema_generation_shared.py", line 83, in __call__
    schema = self._handler(source_type)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 2186, in new_handler
    schema = metadata_get_schema(source, get_inner_schema)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 2182, in <lambda>
    lambda source, handler: handler(source)
                            ^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_schema_generation_shared.py", line 83, in __call__
    schema = self._handler(source_type)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 2085, in inner_handler
    schema = self._generate_schema_inner(obj)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 929, in _generate_schema_inner
    return self.match_type(obj)
           ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 1029, in match_type
    return self._match_generic_type(obj, origin)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 1058, in _match_generic_type
    return self._union_schema(obj)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 1378, in _union_schema
    choices.append(self.generate_schema(arg))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 655, in generate_schema
    schema = self._generate_schema_inner(obj)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 929, in _generate_schema_inner
    return self.match_type(obj)
           ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 1038, in match_type
    return self._unknown_type_schema(obj)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 558, in _unknown_type_schema
    raise PydanticSchemaGenerationError(
pydantic.errors.PydanticSchemaGenerationError: Unable to generate pydantic-core schema for <class 'starlette.requests.Request'>. Set `arbitrary_types_allowed=True` in the model_config to ignore this error or implement `__get_pydantic_core_schema__` on your type to fully support it.

If you got this error by calling handler(<some type>) within `__get_pydantic_core_schema__` then you likely need to call `handler.generate_schema(<some type>)` since we do not call `__get_pydantic_core_schema__` on `<some type>` otherwise to avoid infinite recursion.

For further information visit https://errors.pydantic.dev/2.9/u/schema-for-unknown-type
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\type_adapter.py", line 279, in _init_core_attrs
    self._core_schema = _getattr_no_parents(self._type, '__pydantic_core_schema__')
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\type_adapter.py", line 121, in _getattr_no_parents
    raise AttributeError(attribute)
AttributeError: __pydantic_core_schema__

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 406, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 70, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\applications.py", line 113, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\middleware\errors.py", line 187, in __call__
    raise exc
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\middleware\errors.py", line 165, in __call__
    await self.app(scope, receive, _send)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\route_utils.py", line 695, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\route_utils.py", line 711, in simple_response
    await self.app(scope, receive, send)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\middleware\exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 62, in wrapped_app
    raise exc
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 51, in wrapped_app
    await app(scope, receive, sender)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 715, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 735, in app
    await route.handle(scope, receive, send)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 288, in handle
    await self.app(scope, receive, send)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 76, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 62, in wrapped_app
    raise exc
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 51, in wrapped_app
    await app(scope, receive, sender)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 73, in app
    response = await f(request)
               ^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\routing.py", line 291, in app
    solved_result = await solve_dependencies(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\dependencies\utils.py", line 639, in solve_dependencies
    ) = await request_body_to_args(  # body_params checked above
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\dependencies\utils.py", line 810, in request_body_to_args
    fields_to_extract = get_model_fields(first_field.type_)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\_compat.py", line 283, in get_model_fields
    return [
           ^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\_compat.py", line 284, in <listcomp>
    ModelField(field_info=field_info, name=name)
  File "<string>", line 6, in __init__
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\_compat.py", line 109, in __post_init__
    self._type_adapter: TypeAdapter[Any] = TypeAdapter(
                                           ^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\type_adapter.py", line 266, in __init__
    self._init_core_attrs(rebuild_mocks=False)
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\type_adapter.py", line 144, in wrapped
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\type_adapter.py", line 286, in _init_core_attrs
    self._core_schema = _get_schema(self._type, config_wrapper, parent_depth=self._parent_depth)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\type_adapter.py", line 104, in _get_schema
    schema = gen.generate_schema(type_)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 655, in generate_schema
    schema = self._generate_schema_inner(obj)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 908, in _generate_schema_inner
    return self._annotated_schema(obj)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 2025, in _annotated_schema
    schema = self._apply_annotations(source_type, annotations)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 2104, in _apply_annotations
    schema = get_inner_schema(source_type)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_schema_generation_shared.py", line 83, in __call__
    schema = self._handler(source_type)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 2186, in new_handler
    schema = metadata_get_schema(source, get_inner_schema)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 2182, in <lambda>
    lambda source, handler: handler(source)
                            ^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_schema_generation_shared.py", line 83, in __call__
    schema = self._handler(source_type)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 2085, in inner_handler
    schema = self._generate_schema_inner(obj)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 929, in _generate_schema_inner
    return self.match_type(obj)
           ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 1029, in match_type
    return self._match_generic_type(obj, origin)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 1058, in _match_generic_type
    return self._union_schema(obj)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 1378, in _union_schema
    choices.append(self.generate_schema(arg))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 655, in generate_schema
    schema = self._generate_schema_inner(obj)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 929, in _generate_schema_inner
    return self.match_type(obj)
           ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 1038, in match_type
    return self._unknown_type_schema(obj)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\_internal\_generate_schema.py", line 558, in _unknown_type_schema
    raise PydanticSchemaGenerationError(
pydantic.errors.PydanticSchemaGenerationError: Unable to generate pydantic-core schema for <class 'starlette.requests.Request'>. Set `arbitrary_types_allowed=True` in the model_config to ignore this error or implement `__get_pydantic_core_schema__` on your type to fully support it.

If you got this error by calling handler(<some type>) within `__get_pydantic_core_schema__` then you likely need to call `handler.generate_schema(<some type>)` since we do not call `__get_pydantic_core_schema__` on `<some type>` otherwise to avoid infinite recursion.

For further information visit https://errors.pydantic.dev/2.9/u/schema-for-unknown-type

System Info

OS: Windows 10 Pro 22H2
CPU: i5-10600
GPU: RTX 2070 super (8 GB VRAM)
RAM: 16GB
tarnvaal commented 2 months ago

https://github.com/pydantic/pydantic/releases/tag/v2.9.0 Dropped 8 hours ago.

possibly related?

mario-holubar commented 2 months ago

I have the same problem. Rolling back to an earlier release of pydantic didn't solve it :/

FriendZenny commented 2 months ago

Having same issue with fresh install of Ubuntu 22.04.

aabergh commented 2 months ago

Same issue with fresh install on Windows 11.

fantik11 commented 2 months ago

Same on colab

digitalspaceport commented 2 months ago

Same issue Ubuntu 22.04

NuoFang6 commented 2 months ago

I have the same issue. The problem still occurs even after reinstalling using the dev branch.

travisvn commented 2 months ago

Also experiencing this issue on Ubuntu 24.04 LTS

Fresh install from git repo. RTX 4090

CalicoBill commented 2 months ago

I'm having the same error

OS: Windows 10 Pro CPU: i7-13700 GPU: RTX 2060 (6 GB VRAM) RAM: 32GB

m-m-moradi commented 2 months ago

fresh install, exactly same issue.

PilotFlying commented 2 months ago

+1

martkartasev commented 2 months ago

+1

kennethlkw commented 2 months ago

I had the same issue. Downgrade to fastapi==0.112.4 and it works.

martkartasev commented 2 months ago

I had the same issue. Downgrade to fastapi==0.112.4 and it works.

I also had to downgrade pydantic and pydantic-core

pydantic==2.8.2 pydantic-core==2.20.1 fastapi==0.112.4

works for me.

Meteorfire7 commented 2 months ago

I had the same issue. Downgrade to fastapi==0.112.4 and it works.

I also had to downgrade pydantic and pydantic-core

pydantic==2.8.2 pydantic-core==2.20.1 fastapi==0.112.4

works for me.

Hi, I tried this and the problem is still the same. Thank you for your help anyways :)

PilotFlying commented 2 months ago

@Meteorfire7, how did you try? (Downgrading solved the problem for me, too)

bastienlg commented 2 months ago

How to downgrade libraries ?

Meteorfire7 commented 2 months ago

@Meteorfire7, how did you try? (Downgrading solved the problem for me, too)

I uninstalled the versions I had using the Windows command console (pip uninstall ...) ad then I installed the right versions with the same methods (pip install).

Do I have to do it in another way?

web3wavey commented 2 months ago

I had the same issue. Downgrade to fastapi==0.112.4 and it works.

I also had to downgrade pydantic and pydantic-core pydantic==2.8.2 pydantic-core==2.20.1 fastapi==0.112.4 works for me.

Hi, I tried this and the problem is still the same. Thank you for your help anyways :)

I downgraded all of those too and still have this issue! for a little bit of context I am trying to run via cpu only.

liamgorham2 commented 2 months ago

@Meteorfire7, how did you try? (Downgrading solved the problem for me, too)

I uninstalled the versions I had using the Windows command console (pip uninstall ...) ad then I installed the right versions with the same methods (pip install).

Do I have to do it in another way?

Run these three commands first (the "upgrade" behaves as downgrade with the version stated) - pip install --upgrade pydantic==2.8.2 pip install --upgrade pydantic-core==2.20.1 pip install --upgrade fastapi==0.112.4

Then navigate to C:\Users\YOURUSERNAME\AppData\Local\Programs\Python\Python312\Lib\site-packages

if your python version is different change the version bits

You'll find in there the pydantic, pydantic core and fastapi folders alongside the .dist-info folders for each

Go to your folder where oobabooga is installed - go to the folders \installer_files\env\Lib\site-packages in there you'll find the higher version folders of pydantic, pydantic core and fastapi (and .dist-info folders) delete these and replace them with the lower versions from your appdata location

Reload and enjoy!

CalicoBill commented 2 months ago

@Meteorfire7, how did you try? (Downgrading solved the problem for me, too)

I uninstalled the versions I had using the Windows command console (pip uninstall ...) ad then I installed the right versions with the same methods (pip install). Do I have to do it in another way?

Run these three commands first (the "upgrade" behaves as downgrade with the version stated) - pip install --upgrade pydantic==2.8.2 pip install --upgrade pydantic-core==2.20.1 pip install --upgrade fastapi==0.112.4

Then navigate to C:\Users\YOURUSERNAME\AppData\Local\Programs\Python\Python312\Lib\site-packages

if your python version is different change the version bits

You'll find in there the pydantic, pydantic core and fastapi folders alongside the .dist-info folders for each

Go to your folder where oobabooga is installed - go to the folders \installer_files\env\Lib\site-packages in there you'll find the higher version folders of pydantic, pydantic core and fastapi (and .dist-info folders) delete these and replace them with the lower versions from your appdata location

Reload and enjoy!

I tried that, and it didn't work. I'm going to reinstall and try the fix again again.

hansidm commented 2 months ago

If you are reinstalling, add the versions you need to the requirements.txt file. It will then install these, and you won't need to do anything else.

CalicoBill commented 2 months ago

@Meteorfire7, how did you try? (Downgrading solved the problem for me, too)

I uninstalled the versions I had using the Windows command console (pip uninstall ...) ad then I installed the right versions with the same methods (pip install). Do I have to do it in another way?

Run these three commands first (the "upgrade" behaves as downgrade with the version stated) - pip install --upgrade pydantic==2.8.2 pip install --upgrade pydantic-core==2.20.1 pip install --upgrade fastapi==0.112.4 Then navigate to C:\Users\YOURUSERNAME\AppData\Local\Programs\Python\Python312\Lib\site-packages if your python version is different change the version bits You'll find in there the pydantic, pydantic core and fastapi folders alongside the .dist-info folders for each Go to your folder where oobabooga is installed - go to the folders \installer_files\env\Lib\site-packages in there you'll find the higher version folders of pydantic, pydantic core and fastapi (and .dist-info folders) delete these and replace them with the lower versions from your appdata location Reload and enjoy!

I tried that, and it didn't work. I'm going to reinstall and try the fix again again.

I only replace the fastapi and that worked for me. I didn't have to replace the pydantic parts.

ry60003333 commented 2 months ago

Also hitting this on Ubuntu 22.04.4 LTS; I'll give the downgrading a try.

kennethlkw commented 2 months ago

The issue has been reported here: https://github.com/fastapi/fastapi/issues/12133

Kaszebe commented 2 months ago

Also hitting this on Ubuntu 22.04.4 LTS; I'll give the downgrading a try.

If you're able to get it to work, can you please tell us the steps? I'm on PoP-OS (Ubuntu 22.04).

Meteorfire7 commented 2 months ago

@Meteorfire7, how did you try? (Downgrading solved the problem for me, too)

I uninstalled the versions I had using the Windows command console (pip uninstall ...) ad then I installed the right versions with the same methods (pip install). Do I have to do it in another way?

Run these three commands first (the "upgrade" behaves as downgrade with the version stated) - pip install --upgrade pydantic==2.8.2 pip install --upgrade pydantic-core==2.20.1 pip install --upgrade fastapi==0.112.4

Then navigate to C:\Users\YOURUSERNAME\AppData\Local\Programs\Python\Python312\Lib\site-packages

if your python version is different change the version bits

You'll find in there the pydantic, pydantic core and fastapi folders alongside the .dist-info folders for each

Go to your folder where oobabooga is installed - go to the folders \installer_files\env\Lib\site-packages in there you'll find the higher version folders of pydantic, pydantic core and fastapi (and .dist-info folders) delete these and replace them with the lower versions from your appdata location

Reload and enjoy!

So I tried that and got these result:

I didn't find any of the three (pydantic, pydantic_core and fastapi) in the Python312 BUT i did fin them in the Python310 folder so I used those (with their .dist-info folders). After I copy and pasted them after eliminating the old ones in the Oobabooga folder I run it and it gives me a bunch of errors of some kind:

┌───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────┐ │ C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\server.py:21 in │ │ │ │ 20 with RequestBlocker(): │ │ > 21 from modules import gradio_hijack │ │ 22 import gradio as gr │ │ │ │ C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\modules\gradio_hijack.py:9 in │ │ │ │ 8 │ │ > 9 import gradio as gr │ │ 10 │ │ │ │ C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio__init │ │ .py:3 in │ │ │ │ 2 │ │ > 3 import gradio._simple_templates │ │ 4 import gradio.image_utils │ │ │ │ C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installerfiles\env\Lib\site-packages\gradio_simple │ │ templates__init.py:1 in │ │ │ │ > 1 from .simpledropdown import SimpleDropdown │ │ 2 from .simpleimage import SimpleImage │ │ │ │ C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installerfiles\env\Lib\site-packages\gradio_simple │ │ templates\simpledropdown.py:6 in │ │ │ │ 5 │ │ > 6 from gradio.components.base import FormComponent │ │ 7 from gradio.events import Events │ │ │ │ ... 11 frames hidden ... │ │ │ │ C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\excepti │ │ ons.py:3 in │ │ │ │ 2 │ │ > 3 from pydantic import BaseModel, create_model │ │ 4 from starlette.exceptions import HTTPException as StarletteHTTPException │ │ │ │ C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\init │ │ .py:404 in getattr │ │ │ │ 403 else: │ │ > 404 module = import_module(module_name, package=package) │ │ 405 return getattr(module, attr_name) │ │ │ │ C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\importlib\init__.py:126 in │ │ import_module │ │ │ │ 125 level += 1 │ │ > 126 return _bootstrap._gcd_import(name[level:], package, level) │ │ 127 │ │ │ │ C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydantic\main.p │ │ y:27 in │ │ │ │ 26 │ │ > 27 import pydantic_core │ │ 28 import typing_extensions │ │ │ │ C:\Users\Marco\Documents\Oobabooga\text-generation-webui-main\installer_files\env\Lib\site-packages\pydanticcore\ │ │ _init.py:6 in │ │ │ │ 5 │ │ > 6 from ._pydantic_core import ( │ │ 7 ArgsKwargs, │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ ModuleNotFoundError: No module named 'pydantic_core._pydantic_core' Premere un tasto per continuare . . .

(At the end the last line it says "click any button to continue" in Italian, if I do that it closes itself)

What should I do? Is there a difference between the Python310 and the 312 folder?

oobabooga commented 2 months ago

This should be fixed on a fresh install after https://github.com/oobabooga/text-generation-webui/commit/ac30b004efd7b9e2511d0baf619e8025c745ba09 and https://github.com/oobabooga/text-generation-webui/commit/f98431c7448381bfa4e859ace70e0379f6431018.

Kaszebe commented 2 months ago

This should be fixed on a fresh install after ac30b00 and f98431c.

This is probably the dumbest question of the year....but does what you said mean I should uninstall the failed installation and re-install Oobabooga and everything will work now?

oobabooga commented 2 months ago

You can just delete the installer_files folder and restart the webui.

Kaszebe commented 2 months ago

You can just delete the installer_files folder and restart the webui.

Thanks, worked perfectly. Which one of the web browsing extensions is your favorite or works the best? I mostly use Llama 3.1 70B Instruct and Mistral V2 2407 Large Q6 quants.

And thank you for making and updating Oobabooga. I'm not a n00b but I'm far from an expert. I have tried almost all other LLM inferencing programs out there and I keep coming back to Oobabooga because it's easy to use and it works.

Is there any way to update the GUI? I have been using Oobabooga for almost a year now and the same old colors are getting boring after a while. I would like to have the ability to change up the colors every now and then.

Thanks!

rtaskf commented 2 months ago

Deleting the installer_files folder and restarting start_windows.bat doesn't solve the issue for me.

ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "D:\Programme\Git\text-generation-webui\installer_files\env\Lib\site-packages\pydantic\type_adapter.py", line 279, in _init_core_attrs
    self._core_schema = _getattr_no_parents(self._type, '__pydantic_core_schema__')
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Programme\Git\text-generation-webui\installer_files\env\Lib\site-packages\pydantic\type_adapter.py", line 121, in _getattr_no_parents
    raise AttributeError(attribute)
AttributeError: __pydantic_core_schema__

During handling of the above exception, another exception occurred:
[......................................]

I have the same hardware and issue as OP and also wanted to try the webui yesterday for the first time. Am I missing something?

Meteorfire7 commented 2 months ago

You can just delete the installer_files folder and restart the webui.

Thank you so much. After a fresh install it finally works.

Meteorfire7 commented 2 months ago

Deleting the installer_files folder and restarting start_windows.bat doesn't solve the issue for me.

ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "D:\Programme\Git\text-generation-webui\installer_files\env\Lib\site-packages\pydantic\type_adapter.py", line 279, in _init_core_attrs
    self._core_schema = _getattr_no_parents(self._type, '__pydantic_core_schema__')
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Programme\Git\text-generation-webui\installer_files\env\Lib\site-packages\pydantic\type_adapter.py", line 121, in _getattr_no_parents
    raise AttributeError(attribute)
AttributeError: __pydantic_core_schema__

During handling of the above exception, another exception occurred:
[......................................]

I have the same hardware and issue as OP and also wanted to try the webui yesterday for the first time. Am I missing something?

I Installed the program from zero and it worked. Try that: download the .zip installer, unzip it, open the start file for your machine and follow the instructions.

rtaskf commented 2 months ago

I Installed the program from zero and it worked. Try that: download the .zip installer, unzip it, open the start file for your machine and follow the instructions.

Thanks! I deleted the whole installation and cloned it again. Now it seems to work without errors.

hewenhan commented 2 months ago

This error is caused by the conflict between fastapi and pydantic. It is useless to install the specified version package normally, because the program installs dependencies in the isolation environment of conda.

Modify this file: \RAG\trt-llm-rag-windows-main\app_launch.bat

Before the line python verify_install.py, insert:

    pip install --upgrade pydantic==2.8.2
    pip install --upgrade pydantic-core==2.20.1
    pip install --upgrade fastapi==0.112.4

This problem can be solved

Screenshot 2024-09-19 212903