text-generation-webui icon indicating copy to clipboard operation
text-generation-webui copied to clipboard

Pydantic errors - (I'm a newbie)

Open Meteorfire7 opened this issue 1 year ago • 36 comments

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?

  • [X] I have searched the existing issues

Reproduction

  • Open Oobabooga
  • Put the given IP in your browser

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

Meteorfire7 avatar Sep 05 '24 22:09 Meteorfire7

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

possibly related?

tarnvaal avatar Sep 05 '24 23:09 tarnvaal

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

mario-holubar avatar Sep 06 '24 00:09 mario-holubar

Having same issue with fresh install of Ubuntu 22.04.

FriendZenny avatar Sep 06 '24 02:09 FriendZenny

Same issue with fresh install on Windows 11.

aabergh avatar Sep 06 '24 03:09 aabergh

Same on colab

fantik11 avatar Sep 06 '24 03:09 fantik11

Same issue Ubuntu 22.04

digitalspaceport avatar Sep 06 '24 03:09 digitalspaceport

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

NuoFang6 avatar Sep 06 '24 04:09 NuoFang6

Also experiencing this issue on Ubuntu 24.04 LTS

Fresh install from git repo. RTX 4090

travisvn avatar Sep 06 '24 04:09 travisvn

I'm having the same error

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

CalicoBill avatar Sep 06 '24 07:09 CalicoBill

fresh install, exactly same issue.

m-m-moradi avatar Sep 06 '24 09:09 m-m-moradi

+1

PilotFlying avatar Sep 06 '24 09:09 PilotFlying

+1

martkartasev avatar Sep 06 '24 09:09 martkartasev

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

kennethlkw avatar Sep 06 '24 09:09 kennethlkw

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.

martkartasev avatar Sep 06 '24 09:09 martkartasev

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 :)

Meteorfire7 avatar Sep 06 '24 10:09 Meteorfire7

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

PilotFlying avatar Sep 06 '24 12:09 PilotFlying

How to downgrade libraries ?

bastienlg avatar Sep 06 '24 12:09 bastienlg

@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?

Meteorfire7 avatar Sep 06 '24 13:09 Meteorfire7

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.

web3wavey avatar Sep 06 '24 14:09 web3wavey

@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!

liamgorham2 avatar Sep 06 '24 14:09 liamgorham2

@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.

CalicoBill avatar Sep 06 '24 15:09 CalicoBill

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.

hansidm avatar Sep 06 '24 15:09 hansidm

@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.

CalicoBill avatar Sep 06 '24 15:09 CalicoBill

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

Ry6000 avatar Sep 06 '24 15:09 Ry6000

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

kennethlkw avatar Sep 06 '24 15:09 kennethlkw

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).

Kaszebe avatar Sep 06 '24 21:09 Kaszebe

@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\installer_files\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\installer_files\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\pydantic_core_ │ │ 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?

Meteorfire7 avatar Sep 06 '24 23:09 Meteorfire7

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.

oobabooga avatar Sep 07 '24 01:09 oobabooga

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?

Kaszebe avatar Sep 07 '24 01:09 Kaszebe

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

oobabooga avatar Sep 07 '24 01:09 oobabooga