Skip to content
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

ImportError: cannot import name 'Doc' from 'typing_extensions' #245

Open
gmammolo opened this issue Nov 19, 2023 · 1 comment
Open

ImportError: cannot import name 'Doc' from 'typing_extensions' #245

gmammolo opened this issue Nov 19, 2023 · 1 comment

Comments

@gmammolo
Copy link

During the first boot, after the Docker command docker compose up --build, I get this error:

optimizedstablediffusion-sd-1 | Clearing symlinks in /etc/ssl/certs...
optimizedstablediffusion-sd-1 | done.
optimizedstablediffusion-sd-1 | Updating certificates in /etc/ssl/certs...
optimizedstablediffusion-sd-1 | rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL
optimizedstablediffusion-sd-1 | 137 added, 0 removed; done.
optimizedstablediffusion-sd-1 | Running hooks in /etc/ca-certificates/update.d...
optimizedstablediffusion-sd-1 | done.
optimizedstablediffusion-sd-1 | Traceback (most recent call last):
optimizedstablediffusion-sd-1 | File "optimizedSD/txt2img_gradio.py", line 1, in
optimizedstablediffusion-sd-1 | import gradio as gr
optimizedstablediffusion-sd-1 | File "/venv/lib/python3.8/site-packages/gradio/init.py", line 3, in
optimizedstablediffusion-sd-1 | import gradio.components as components
optimizedstablediffusion-sd-1 | File "/venv/lib/python3.8/site-packages/gradio/components.py", line 39, in
optimizedstablediffusion-sd-1 | from gradio.blocks import Block
optimizedstablediffusion-sd-1 | File "/venv/lib/python3.8/site-packages/gradio/blocks.py", line 19, in
optimizedstablediffusion-sd-1 | from gradio import (
optimizedstablediffusion-sd-1 | File "/venv/lib/python3.8/site-packages/gradio/event_queue.py", line 8, in
optimizedstablediffusion-sd-1 | import fastapi
optimizedstablediffusion-sd-1 | File "/venv/lib/python3.8/site-packages/fastapi/init.py", line 7, in
optimizedstablediffusion-sd-1 | from .applications import FastAPI as FastAPI
optimizedstablediffusion-sd-1 | File "/venv/lib/python3.8/site-packages/fastapi/applications.py", line 16, in
optimizedstablediffusion-sd-1 | from fastapi import routing
optimizedstablediffusion-sd-1 | File "/venv/lib/python3.8/site-packages/fastapi/routing.py", line 22, in
optimizedstablediffusion-sd-1 | from fastapi import params
optimizedstablediffusion-sd-1 | File "/venv/lib/python3.8/site-packages/fastapi/params.py", line 5, in
optimizedstablediffusion-sd-1 | from fastapi.openapi.models import Example
optimizedstablediffusion-sd-1 | File "/venv/lib/python3.8/site-packages/fastapi/openapi/models.py", line 4, in
optimizedstablediffusion-sd-1 | from fastapi._compat import (
optimizedstablediffusion-sd-1 | File "/venv/lib/python3.8/site-packages/fastapi/_compat.py", line 20, in
optimizedstablediffusion-sd-1 | from fastapi.exceptions import RequestErrorModel
optimizedstablediffusion-sd-1 | File "/venv/lib/python3.8/site-packages/fastapi/exceptions.py", line 6, in
optimizedstablediffusion-sd-1 | from typing_extensions import Annotated, Doc # type: ignore [attr-defined]
optimizedstablediffusion-sd-1 | ImportError: cannot import name 'Doc' from 'typing_extensions' (/venv/lib/python3.8/site-packages/typing_extensions.py)

@justADeni
Copy link

Same here! Tried changing typing_extensions version in Docker file with pip commands but that didn't work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants