SugarcaneDefender / z-waif

Fully local program to make your own AI waifu! Vtuber model, voice, ect. Emphasis on personal use and companionship.
MIT License
24 stars 2 forks source link

AttributeError: __pydantic_core_schema__ #1

Closed makestuff4fun closed 3 weeks ago

makestuff4fun commented 1 month ago

I followed your good video to get things installed and ran into a few errors. First was minecraft log not found, made a dummy log file, passed that one. Now I get an endless stream of pydantic errors and the web interface errors on all fields.

I'm running windows 11, I have oogabooga running fine as well as the voice stuff with virtual audio cable.

I did try upgrading gradio, not the solution.

I manually activated the venv and ran pip freeze (venv) D:\waifu\z-waif>pip freeze aiofiles==23.2.1 aiohappyeyeballs==2.4.2 aiohttp==3.10.8 aiosignal==1.3.1 altair==5.4.1 annotated-types==0.7.0 anyio==4.6.0 attrs==24.2.0 certifi==2024.8.30 cffi==1.17.1 charset-normalizer==3.3.2 click==8.1.7 colorama==0.4.6 contourpy==1.3.0 cycler==0.12.1 discord==2.3.2 discord.py==2.4.0 emoji==2.9.0 fastapi==0.115.0 ffmpy==0.4.0 filelock==3.13.1 fonttools==4.54.1 frozenlist==1.4.1 fsspec==2024.2.0 gradio==4.25.0 gradio_client==0.15.0 h11==0.14.0 httpcore==1.0.5 httpx==0.27.2 huggingface-hub==0.25.1 humanize==4.7.0 idna==3.10 importlib_resources==6.4.5 Jinja2==3.1.3 jsonschema==4.23.0 jsonschema-specifications==2023.12.1 keyboard==0.13.5 kiwisolver==1.4.7 llvmlite==0.43.0 markdown-it-py==3.0.0 MarkupSafe==2.1.5 matplotlib==3.9.2 mdurl==0.1.2 more-itertools==10.5.0 mouse==0.7.1 mpmath==1.3.0 multidict==6.1.0 narwhals==1.8.4 networkx==3.2.1 numba==0.60.0 numpy==1.24.4 openai-whisper @ git+https://github.com/openai/whisper.git@423492dda7806206abe56bdfe427c1096473a020 opencv-python==4.10.0.84 orjson==3.10.7 packaging==24.1 pandas==2.2.3 pillow==10.2.0 PyAudio==0.2.14 pycparser==2.22 pydantic==2.9.2 pydantic_core==2.23.4 pydub==0.25.1 PyGetWindow==0.0.9 Pygments==2.18.0 pyparsing==3.1.4 PyRect==0.2.0 PythMC==1.2.2 python-dateutil==2.9.0.post0 python-dotenv==1.0.1 python-multipart==0.0.12 pytz==2024.2 pyvts==0.3.3 pywin32==306 PyYAML==6.0.2 referencing==0.35.1 regex==2024.9.11 requests==2.31.0 rich==13.8.1 rpds-py==0.20.0 ruff==0.6.8 semantic-version==2.10.0 shellingham==1.5.4 six==1.16.0 sniffio==1.3.1 sounddevice==0.4.7 starlette==0.38.6 sympy==1.12 tiktoken==0.7.0 tomlkit==0.12.0 torch==2.4.1+cu118 torchaudio==2.4.1+cu118 torchvision==0.19.1+cu118 tqdm==4.66.5 typer==0.12.5 typing_extensions==4.12.2 tzdata==2024.2 urllib3==2.2.3 uvicorn==0.31.0 websockets==11.0.3 yarl==1.13.1

Here is more of the logfile: and it just goes on and on. ERROR: Exception in ASGI application Traceback (most recent call last): File "D:\waifu\z-waif\venv\Lib\site-packages\pydantic\type_adapter.py", line 270, in _init_core_attrs self._core_schema = _getattr_no_parents(self._type, 'pydantic_core_schema') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\waifu\z-waif\venv\Lib\site-packages\pydantic\type_adapter.py", line 112, 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 "D:\waifu\z-waif\venv\Lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 406, in run_asgi result = await app( # type: ignore[func-returns-value] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\waifu\z-waif\venv\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 60, in call return await self.app(scope, receive, send) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\waifu\z-waif\venv\Lib\site-packages\fastapi\applications.py", line 1054, in call await super().call(scope, receive, send) File "D:\waifu\z-waif\venv\Lib\site-packages\starlette\applications.py", line 113, in call await self.middleware_stack(scope, receive, send) File "D:\waifu\z-waif\venv\Lib\site-packages\starlette\middleware\errors.py", line 187, in call raise exc File "D:\waifu\z-waif\venv\Lib\site-packages\starlette\middleware\errors.py", line 165, in call await self.app(scope, receive, _send) File "D:\waifu\z-waif\venv\Lib\site-packages\gradio\route_utils.py", line 686, in call await self.simple_response(scope, receive, send, request_headers=headers) File "D:\waifu\z-waif\venv\Lib\site-packages\gradio\route_utils.py", line 702, in simple_response await self.app(scope, receive, send) File "D:\waifu\z-waif\venv\Lib\site-packages\starlette\middleware\exceptions.py", line 62, in call await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "D:\waifu\z-waif\venv\Lib\site-packages\starlette_exception_handler.py", line 62, in wrapped_app raise exc File "D:\waifu\z-waif\venv\Lib\site-packages\starlette_exception_handler.py", line 51, in wrapped_app await app(scope, receive, sender) File "D:\waifu\z-waif\venv\Lib\site-packages\starlette\routing.py", line 715, in call await self.middleware_stack(scope, receive, send) File "D:\waifu\z-waif\venv\Lib\site-packages\starlette\routing.py", line 735, in app await route.handle(scope, receive, send) File "D:\waifu\z-waif\venv\Lib\site-packages\starlette\routing.py", line 288, in handle await self.app(scope, receive, send) File "D:\waifu\z-waif\venv\Lib\site-packages\starlette\routing.py", line 76, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "D:\waifu\z-waif\venv\Lib\site-packages\starlette_exception_handler.py", line 62, in wrapped_app raise exc File "D:\waifu\z-waif\venv\Lib\site-packages\starlette_exception_handler.py", line 51, in wrapped_app await app(scope, receive, sender) File "D:\waifu\z-waif\venv\Lib\site-packages\starlette\routing.py", line 73, in app response = await f(request) ^^^^^^^^^^^^^^^^ File "D:\waifu\z-waif\venv\Lib\site-packages\fastapi\routing.py", line 291, in app solved_result = await solve_dependencies( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\waifu\z-waif\venv\Lib\site-packages\fastapi\dependencies\utils.py", line 656, in solve_dependencies ) = await request_body_to_args( # body_params checked above ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

makestuff4fun commented 1 month ago

log.txt

SugarcaneDefender commented 1 month ago

Seems to be an issue with the UI and it's dependencies. I may need to tighten the requirements on it. Does this happen when you go into the .env and set the Minecraft Module to "OFF"?

Also, I need to release a tutorial for the Minecraft install - in essence, it needs a Forge install, with Baritone and Wurst, as those are the two mods that you can feed commands to and tun the AI. I know I had to change the code in the Minecraft package and "hotwire" it to point to the forge install instead.

SugarcaneDefender commented 3 weeks ago

Just checked, you may want to re-install all of the venv files. There was an issue with the dependencies for Gradio, that broke them for the short period of time you were using it.

The issue is in here, seems to be fixed by just updating everything

I'll have the Minecraft tutorial out eventually, but I'll try and put more info in the documentation file this week.

SugarcaneDefender commented 3 weeks ago

I have found and fixed the issues! If you download the latest version, it will fix both of your crashes- the WebUI and the Minecraft file one. If it does work, please let me know.