Skip to content
This repository has been archived by the owner on Aug 10, 2023. It is now read-only.

Circular dependency error in import when using pip package #3

Closed
moozilla opened this issue Dec 4, 2022 · 3 comments
Closed

Circular dependency error in import when using pip package #3

moozilla opened this issue Dec 4, 2022 · 3 comments

Comments

@moozilla
Copy link

moozilla commented Dec 4, 2022

When I try to run the example code, I'm getting this error:

Traceback (most recent call last):
  File "/Users/moozilla/git/chatgpt_tool/main.py", line 1, in <module>
    import revChatGPT
  File "/Users/moozilla/git/chatgpt_tool/venv/lib/python3.10/site-packages/revChatGPT/__init__.py", line 1, in <module>
    from revChatGPT import Chatbot
ImportError: cannot import name 'Chatbot' from partially initialized module 'revChatGPT' (most likely due to a circular import)

I was able to fix it by commenting out the from revChatGPT import Chatbot line in __init__.py.

@acheong08
Copy link
Owner

When I try to run the example code, I'm getting this error:

Traceback (most recent call last):
  File "/Users/moozilla/git/chatgpt_tool/main.py", line 1, in <module>
    import revChatGPT
  File "/Users/moozilla/git/chatgpt_tool/venv/lib/python3.10/site-packages/revChatGPT/__init__.py", line 1, in <module>
    from revChatGPT import Chatbot
ImportError: cannot import name 'Chatbot' from partially initialized module 'revChatGPT' (most likely due to a circular import)

I was able to fix it by commenting out the from revChatGPT import Chatbot line in __init__.py.

Sorry. Fixing that now

@acheong08
Copy link
Owner

Fixed. pip3 install revChatGPT --upgrade

@moozilla
Copy link
Author

moozilla commented Dec 4, 2022

Thanks! I can confirm the fix is working on my end.

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

No branches or pull requests

2 participants