autogen
autogen copied to clipboard
ModuleNotFoundError: No module named 'openai.openai_object'
Traceback (most recent call last):
File "/Users/hongyiwu/Instalily/code/auto-agent/action-agent/src/data_synthesizer.py", line 114, in <module>
user_proxy.initiate_chat(manager, message="get the ads with worst purchase_roas for the ad set 600033 and pick 4 ads to that are the worst.")
File "/Users/hongyiwu/miniconda3/envs/agent/lib/python3.11/site-packages/autogen/agentchat/conversable_agent.py", line 544, in initiate_chat
self.send(self.generate_init_message(**context), recipient, silent=silent)
File "/Users/hongyiwu/miniconda3/envs/agent/lib/python3.11/site-packages/autogen/agentchat/conversable_agent.py", line 344, in send
recipient.receive(message, self, request_reply, silent)
File "/Users/hongyiwu/miniconda3/envs/agent/lib/python3.11/site-packages/autogen/agentchat/conversable_agent.py", line 475, in receive
reply = self.generate_reply(messages=self.chat_messages[sender], sender=sender)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/hongyiwu/miniconda3/envs/agent/lib/python3.11/site-packages/autogen/agentchat/conversable_agent.py", line 887, in generate_reply
final, reply = reply_func(self, messages=messages, sender=sender, config=reply_func_tuple["config"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/hongyiwu/miniconda3/envs/agent/lib/python3.11/site-packages/autogen/agentchat/conversable_agent.py", line 619, in generate_oai_reply
response = client.create(
^^^^^^^^^^^^^^
File "/Users/hongyiwu/miniconda3/envs/agent/lib/python3.11/site-packages/autogen/oai/client.py", line 233, in create
response = cache.get(key, None)
^^^^^^^^^^^^^^^^^^^^
File "/Users/hongyiwu/miniconda3/envs/agent/lib/python3.11/site-packages/diskcache/core.py", line 1173, in get
value = self._disk.fetch(mode, filename, db_value, read)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/hongyiwu/miniconda3/envs/agent/lib/python3.11/site-packages/diskcache/core.py", line 284, in fetch
return pickle.load(io.BytesIO(value))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I'm using version 0.2.0b5 and encountered this issue. Do you have any solutions?
@cowsking , are you trying to run one of the AutoGen code samples?
@cowsking , are you trying to run one of the AutoGen code samples?
The samples were successful. The only model that did not work was gpt-3.5-turbo-16k.
Could the problem be that you don't actually have access to gpt-3.5-turbo-16k? Or are you able to use that model from other code?
Try to remove .cache folder. Worked for me
removing .cache folder worked
I have the same problem, deleting the.cache folder is invalid. Can you tell me what version of openai matches python3.10 and python3.11? After many unsuccessful attempts? I don't know what version of everyone can work properly?
I have the same problem, deleting the.cache folder is invalid. Can you tell me what version of openai matches python3.10 and python3.11? After many unsuccessful attempts? I don't know what version of everyone can work properly?
Hi @20130216 , have you tried installing the latest pyautogen and let pip find the proper openai package in a new environment?
@thinkall I am trying to build a chatbot and I am getting the same module error. But the openai requirement is already satisfied. I am trying in VISUAL STUDIO CODE. Can you suggest me any other environment to work on?
@thinkall I am trying to build a chatbot and I am getting the same module error. But the openai requirement is already satisfied. I am trying in VISUAL STUDIO CODE. Can you suggest me any other environment to work on?
Hi @Siva3601 , I would suggest you try creating a new folder as your working directory and also a new virtual env for using the latest autogen. If you still see the same issue, please share more details on your env, and the code snippets for reproducing, so we can try to investigate the root cause. Thanks.