gpt4free icon indicating copy to clipboard operation
gpt4free copied to clipboard

module 'utils' is broken

Open Moulick opened this issue 1 year ago • 3 comments

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

Moulick avatar May 27 '23 13:05 Moulick

how to solve it

rabotone avatar Jun 11 '23 12:06 rabotone

ModuleNotFoundError: No module named 'gpt4free.utils'

rabotone avatar Jun 11 '23 12:06 rabotone

change : from utils import create_email, check_email

to : import gpt4free.utils

LopeKinz avatar Jun 12 '23 06:06 LopeKinz