You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created this PR #5987 as the simplest workaround for the following error.
However, it should be replaced a better solution e.g. resolving the proper version of typing_extensions.
Uncaught (in promise) PythonError: Traceback (most recent call last):
File "/lib/python311.zip/_pyodide/_base.py", line 571, in eval_code_async
await CodeRunner(
File "/lib/python311.zip/_pyodide/_base.py", line 394, in run_async
coroutine = eval(self.code, globals, locals)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<exec>", line 1, in <module>
File "/lib/python3.11/site-packages/gradio/__init__.py", line 3, in <module>
import gradio.components as components
File "/lib/python3.11/site-packages/gradio/components/__init__.py", line 1, in <module>
from gradio.components.annotated_image import AnnotatedImage
File "/lib/python3.11/site-packages/gradio/components/annotated_image.py", line 14, in <module>
from gradio.components.base import IOComponent, _Keywords
File "/lib/python3.11/site-packages/gradio/components/base.py", line 20, in <module>
from fastapi import UploadFile
File "/lib/python3.11/site-packages/fastapi/__init__.py", line 7, in <module>
from .applications import FastAPI as FastAPI
File "/lib/python3.11/site-packages/fastapi/applications.py", line 16, in <module>
from fastapi import routing
File "/lib/python3.11/site-packages/fastapi/routing.py", line 22, in <module>
from fastapi import params
File "/lib/python3.11/site-packages/fastapi/params.py", line 5, in <module>
from fastapi.openapi.models import Example
File "/lib/python3.11/site-packages/fastapi/openapi/models.py", line 4, in <module>
from fastapi._compat import (
File "/lib/python3.11/site-packages/fastapi/_compat.py", line 20, in <module>
from fastapi.exceptions import RequestErrorModel
File "/lib/python3.11/site-packages/fastapi/exceptions.py", line 6, in <module>
from typing_extensions import Annotated, Doc # type: ignore [attr-defined]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: cannot import name 'Doc' from 'typing_extensions' (/lib/python3.11/site-packages/typing_extensions.py)
The text was updated successfully, but these errors were encountered:
@freddyaboulton Thank you!
Actually there is already a list of manually resolved packages here for the same issue with micropip, so this would be one of them.
awaitmicropip.install(["markdown-it-py[linkify]~=2.2.0"]);// On 3rd June 2023, markdown-it-py 3.0.0 has been released. The `gradio` package depends on its `>=2.0.0` version so its 3.x will be resolved. However, it conflicts with `mdit-py-plugins`'s dependency `markdown-it-py >=1.0.0,<3.0.0` and micropip currently can't resolve it. So we explicitly install the compatible version of the library here.
awaitmicropip.install(["anyio==3.*"]);// `fastapi` depends on `anyio>=3.4.0,<5` so its 4.* can be installed, but it conflicts with the anyio version `httpx` depends on, `==3.*`. Seems like micropip can't resolve it for now, so we explicitly install the compatible version of the library here.
awaitmicropip.install(["fastapi<0.104.0"]);// XXX: Workaround for #5986.
I created this PR #5987 as the simplest workaround for the following error.
However, it should be replaced a better solution e.g. resolving the proper version of
typing_extensions
.The text was updated successfully, but these errors were encountered: