-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannot import name 'JsonValue' from 'pydantic' #8327
Comments
Hi @BigMann123yt it looks like you might be using an older version of
|
k that error got fixed, but now theres a different error
|
Hi @BigMann123yt ! You may need to update your langchain version. I can't repro this issue when importing langchain. Will close this as the issue does not seem related to gradio but I will open a PR to fallback to |
yo BigMann.. did you figure this out? |
aah yes i did, thank you for the response anyways. |
Describe the bug
i was making an ai chatbot using gradio and openai api.
and it gave me this error
Traceback (most recent call last): File "" line 3, in <module> import gradio as gr File "C:\Users\krish\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\gradio\__init__.py", line 3, in <module> import gradio._simple_templates File "C:\Users\krish\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\gradio\_simple_templates\__init__.py", line 1, in <module> from .simpledropdown import SimpleDropdown File "C:\Users\krish\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\gradio\_simple_templates\simpledropdown.py", line 6, in <module> from gradio.components.base import FormComponent File "C:\Users\krish\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\gradio\components\__init__.py", line 1, in <module> from gradio.components.annotated_image import AnnotatedImage File "C:\Users\krish\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\gradio\components\annotated_image.py", line 13, in <module> from gradio import processing_utils, utils File "C:\Users\krish\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\gradio\processing_utils.py", line 22, in <module> from gradio import utils, wasm_utils File "C:\Users\krish\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\gradio\utils.py", line 54, in <module> from gradio.data_classes import FileData File "C:\Users\krish\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\gradio\data_classes.py", line 19, in <module> from pydantic import BaseModel, JsonValue, RootModel, ValidationError ImportError: cannot import name 'JsonValue' from 'pydantic' (C:\Users\krish\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\pydantic\__init__.cp311-win_amd64.pyd)
Please advice on what to do, it's also not showing JsonValue in the pydantic module required by gradio
Have you searched existing issues? 🔎
Reproduction
Screenshot
No response
Logs
System Info
Severity
Blocking usage of gradio
The text was updated successfully, but these errors were encountered: