theAbdoSabbagh / UnlimitedGPT

An unofficial Python wrapper for OpenAI's ChatGPT API
https://pypi.org/project/UnlimitedGPT/
GNU General Public License v3.0
339 stars 42 forks source link

cannot import name 'ChatGPT' from partially initialized module 'UnlimitedGPT' #39

Open elcarim opened 11 months ago

elcarim commented 11 months ago

Make sure to start your title with the prefix "[BUG]" followed by a title that describes the bug you're facing within a few words

Description

cannot import name 'ChatGPT' from partially initialized module 'UnlimitedGPT'

Steps to Reproduce

run

Code used

from UnlimitedGPT import ChatGPT

session_token = "eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0..MkiSj6voUalcVmdA.qG84p00faQARLs5NM3yHaQ-DCYKfRN3Af_rPurcnxJbvYme33qNReHak5......5"

chatbot = ChatGPT( session_token, conversation_id=conversation_id, proxy=None, chrome_args=None, disable_moderation=False, verbose=False, )

Paste the relevant code here.

Error Message or Traceback

(venv) PS W:\py\UnlimitedGPT> & w:/py/UnlimitedGPT/venv/Scripts/python.exe w:/py/UnlimitedGPT/UnlimitedGPT.py Traceback (most recent call last): File "w:\py\UnlimitedGPT\UnlimitedGPT.py", line 3, in from UnlimitedGPT import ChatGPT File "w:\py\UnlimitedGPT\UnlimitedGPT.py", line 3, in from UnlimitedGPT import ChatGPT ImportError: cannot import name 'ChatGPT' from partially initialized module 'UnlimitedGPT' (most likely due to a circular import) (w:\py\Unlimit edGPT\UnlimitedGPT.py)



### Environment Information

Please provide details about your environment:

- Python version: 3.11
- Operating System: win10
- UnlimitedGPT version: 

(venv) PS W:\py\UnlimitedGPT> pip list
Package                 Version
----------------------- ---------
attrs                   23.1.0
certifi                 2023.7.22
cffi                    1.15.1
charset-normalizer      3.2.0
exceptiongroup          1.1.3
h11                     0.14.0
idna                    3.4
outcome                 1.2.0
pip                     23.2.1
pycparser               2.21
pyperclip               1.8.2
PySocks                 1.7.1
PyVirtualDisplay        3.0
requests                2.31.0
selenium                4.9.1
setuptools              65.5.0
sniffio                 1.3.0
sortedcontainers        2.4.0
trio                    0.22.2
trio-websocket          0.10.3
undetected-chromedriver 3.4.5
UnlimitedGPT            0.1.9.3
urllib3                 2.0.4
websockets              11.0.3
wsproto                 1.2.0
EnnioEvo commented 11 months ago

try from UnlimitedGPT.UnlimitedGPT import ChatGPT or from UnlimitedGPT.UnlimitedGPT.UnlimitedGPT import ChatGPT

theAbdoSabbagh commented 11 months ago

Hello, thanks for reporting this bug. Currently I'm a bit busy as I've recently enrolled at a university and I have very limited free time now. Once I'm free I'll look into this issue.