BlenderGPT icon indicating copy to clipboard operation
BlenderGPT copied to clipboard

ModuleNotFoundError: No module named 'openai'

Open RevRelic opened this issue 1 year ago • 11 comments

Traceback (most recent call last): File "E:\3d animation for Blender\3.0\scripts\modules\addon_utils.py", line 351, in enable mod = import(module_name) File "C:\Users\Veeckman\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\BlenderGPT-main_init_.py", line 6, in import openai ModuleNotFoundError: No module named 'openai'

Whats going on here ( im not shure if i need to have Python set up or whats the problem)

RevRelic avatar Mar 27 '23 19:03 RevRelic

fixed in latest version. You can re-install it now

gd3kr avatar Mar 27 '23 19:03 gd3kr

The newest version allows for the import of openai, but if you select gpt-4, you get the error:

Error: Python: Traceback (most recent call last):
  File "C:\Users\Pasta\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\BlenderGPT-main\__init__.py", line 174, in execute
    blender_code = generate_blender_code(context.scene.gpt4_chat_input, context.scene.gpt4_chat_history, context, system_prompt)
  File "C:\Users\Pasta\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\BlenderGPT-main\utilities.py", line 51, in generate_blender_code
    response = openai.ChatCompletion.create(
  File "C:\Users\Pasta\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\BlenderGPT-main\lib\openai\api_resources\chat_completion.py", line 25, in create
    return super().create(*args, **kwargs)
  File "C:\Users\Pasta\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\BlenderGPT-main\lib\openai\api_resources\abstract\engine_api_resource.py", line 153, in create
    response, _, api_key = requestor.request(
  File "C:\Users\Pasta\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\BlenderGPT-main\lib\openai\api_requestor.py", line 226, in request
    resp, got_stream = self._interpret_response(result, stream)
  File "C:\Users\Pasta\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\BlenderGPT-main\lib\openai\api_requestor.py", line 619, in _interpret_response
    self._interpret_response_line(
  File "C:\Users\Pasta\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\BlenderGPT-main\lib\openai\api_requestor.py", line 682, in _interpret_response_line
    raise self.handle_error_response(
openai.error.InvalidRequestError: The model: `gpt-4` does not exist

PastaAldente avatar Mar 27 '23 19:03 PastaAldente

I am seeing the same as the last post above. ^ And the execute button just says "please wait", forever, and if you mouse-over this button it says something about an undocumented operator.

cvanmeurs avatar Mar 27 '23 20:03 cvanmeurs

Also getting the same error as mentioned above, gpt-4 does not exist

aelevy1 avatar Mar 27 '23 20:03 aelevy1

Since GPT4 is only available via the waitlist right now, that will happen if you don’t have access yet. https://openai.com/waitlist/gpt-4-api

gd3kr avatar Mar 27 '23 20:03 gd3kr

Since GPT4 is only available via the waitlist right now, that will happen if you don’t have access yet. https://openai.com/waitlist/gpt-4-api

I'm confused. I made an account, I have an API key, I can chat with ChatGPT in their website. Are you saying I require some other type of account?

cvanmeurs avatar Mar 27 '23 20:03 cvanmeurs

^ I have access to GPT4 as well and am getting the same error

angeltfc avatar Mar 27 '23 22:03 angeltfc

@cvanmeurs unfortunately, yes. While they released access to GPT4 for plus users on ChatGPT, they haven't released it for third-party applications. Those are currently only available via the waitlist. This sucks because GPT4 generations are much higher quality (albeit slower) than GPT3.5.

gd3kr avatar Mar 28 '23 02:03 gd3kr

The newest version allows for the import of openai, but if you select gpt-4, you get the error:

Error: Python: Traceback (most recent call last):
  File "C:\Users\Pasta\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\BlenderGPT-main\__init__.py", line 174, in execute
    blender_code = generate_blender_code(context.scene.gpt4_chat_input, context.scene.gpt4_chat_history, context, system_prompt)
  File "C:\Users\Pasta\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\BlenderGPT-main\utilities.py", line 51, in generate_blender_code
    response = openai.ChatCompletion.create(
  File "C:\Users\Pasta\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\BlenderGPT-main\lib\openai\api_resources\chat_completion.py", line 25, in create
    return super().create(*args, **kwargs)
  File "C:\Users\Pasta\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\BlenderGPT-main\lib\openai\api_resources\abstract\engine_api_resource.py", line 153, in create
    response, _, api_key = requestor.request(
  File "C:\Users\Pasta\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\BlenderGPT-main\lib\openai\api_requestor.py", line 226, in request
    resp, got_stream = self._interpret_response(result, stream)
  File "C:\Users\Pasta\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\BlenderGPT-main\lib\openai\api_requestor.py", line 619, in _interpret_response
    self._interpret_response_line(
  File "C:\Users\Pasta\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\BlenderGPT-main\lib\openai\api_requestor.py", line 682, in _interpret_response_line
    raise self.handle_error_response(
openai.error.InvalidRequestError: The model: `gpt-4` does not exist

I also have got this error... :(

OrionRandD avatar Mar 28 '23 15:03 OrionRandD

same problem No module named 'openai'

yozshujar avatar Mar 29 '23 07:03 yozshujar