gpt4free
gpt4free copied to clipboard
module 'utils' is broken
Bug description
streamlit run streamlit_app.py
fails with below
2023-05-27 14:54:11.480 Uncaught app exception
Traceback (most recent call last):
File "/Users/moulick.aggarwal/gpt4free/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
exec(code, module.__dict__)
File "/Users/moulick.aggarwal/gpt4free/streamlit_app.py", line 7, in <module>
from gpt4free import you
File "/Users/moulick.aggarwal/gpt4free/gpt4free/__init__.py", line 6, in <module>
from gpt4free import usesless
File "/Users/moulick.aggarwal/gpt4free/gpt4free/usesless/__init__.py", line 10, in <module>
from utils import create_email, check_email
ModuleNotFoundError: No module named 'utils'
commit: https://github.com/xtekky/gpt4free/commit/e35264d3db5dcc6a0e5ff5a4626e658aa9cb9251
how to solve it
ModuleNotFoundError: No module named 'gpt4free.utils'
change : from utils import create_email, check_email
to : import gpt4free.utils