gpt4free icon indicating copy to clipboard operation
gpt4free copied to clipboard

ModuleNotFoundError: No module named 'typings'

Open MrDie2233 opened this issue 1 year ago • 16 comments

I only move streamlit_app.py from ./gui to the base folder then copy streamlit run streamlit_app.py and run. but i can't run the program. what should i do? Screenshot 2023-05-28 at 12-47-44 streamlit_app · Streamlit 屏幕截图 2023-05-28 125049 屏幕截图 2023-05-28 125303

MrDie2233 avatar May 28 '23 05:05 MrDie2233

I installed and run the docker container by commands from readme, and there is same problem

nkbih avatar May 28 '23 07:05 nkbih

code: https://github.com/xtekky/gpt4free/pull/610/files#diff-be3af1bb5ff64e620f43aa0245b1111573a86af42f0e422b83bf9ba6857d7032R4

iugo avatar May 28 '23 07:05 iugo

I have same problem, both on venv and docker

ParthenGithub avatar May 28 '23 10:05 ParthenGithub

Same for me

caoyifeng007 avatar May 28 '23 11:05 caoyifeng007

also the same thing

othmanordaski avatar May 28 '23 15:05 othmanordaski

same issue here

StanislavGrishaev avatar May 28 '23 15:05 StanislavGrishaev

same issue for me both on vent and docker. thanks for solving.

w2807 avatar May 28 '23 16:05 w2807

Same as me

maxens-git avatar May 28 '23 18:05 maxens-git

For the moment, I

git checkout gpt4free/aicolors/__init__.py
git switch -c rollback
docker compose down; docker compose up --build -d

to roll back.

wakaru44 avatar May 28 '23 23:05 wakaru44

+1

pennpeng avatar May 29 '23 06:05 pennpeng

https://github.com/xtekky/gpt4free/pull/620

Miezhiko avatar May 29 '23 07:05 Miezhiko

so i solved the issue i was running the bot not as user i was root so run the bot as a user and change here gpt4free/aicolors/init.py this from typings import AiColorsResponse into this from .typings import AiColorsResponse After that the bot will runs

envdude avatar May 29 '23 16:05 envdude

so i solved the issue i was running the bot not as user i was root so run the bot as a user and change here gpt4free/aicolors/init.py this from typings import AiColorsResponse into this from .typings import AiColorsResponse After that the bot will runs

it works!

eastyy avatar May 29 '23 17:05 eastyy

Find that line of code and add a dot before "typings".

WQR1234 avatar May 30 '23 13:05 WQR1234

Find that line of code and add a dot before "typings", like " from .typings import AiColorsResponse". Or you can simple copy all the code in typings/init.py into /aicolors/init.py like this:

`# from typings import AiColorsResponse from dataclasses import dataclass

@dataclass class AiColorsResponse: background: str primary: str accent: str text: str`

sparksustc avatar May 31 '23 01:05 sparksustc

so i solved the issue i was running the bot not as user i was root so run the bot as a user and change here gpt4free/aicolors/init.py this from typings import AiColorsResponse into this from .typings import AiColorsResponse After that the bot will runs

It works!👍 Should make that a PR to fix this issue.

linjunshi avatar May 31 '23 14:05 linjunshi