WPeace-HcH / WPeChatGPT

A plugin for IDA that can help to analyze binary file, it can be based on models such as gpt-3.5 turbo, gpt-4 trained by OpenAI, the same as ChatGPT.
964 stars 164 forks source link

module 'openai' has no attribute 'InvalidRequestError'. Did you mean: 'BadRequestError'? #24

Open happyfmy opened 1 month ago

happyfmy commented 1 month ago

Traceback (most recent call last): File "threading.py", line 1045, in _bootstrap_inner File "threading.py", line 982, in run File "E:/xxxxxx/IDA_Pro_7.7/plugins/WPeChatGPT.py", line 280, in query_model except openai.InvalidRequestError as e: ^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: module 'openai' has no attribute 'InvalidRequestError'. Did you mean: 'BadRequestError'?

WPeace-HcH commented 1 month ago

你好,和之前反馈的是同一个问题,由于使用的python旧版本openai包和新版本不兼容,你可以下载v2.4版本WPeChatGPT进行尝试。(如果pip更新了openai包还是出现此类错误,请确认IDA使用的python环境是否正确)

WPeace-HcH commented 1 month ago

v2.4及以前版本支持旧版本openai package v2.5开始兼容新版本包,需要pip进行更新