You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ python3 -m chatdbg -c continue testme.py
ZeroDivisionError: division by zero
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
>~/chatdbg/test/testme.py(4)tryme()
->if x / i > 2:
(ChatDBG Pdb) why
EXCEPTION 'choices'
(ChatDBG Pdb)
It starts working after setting OPENAI_API_KEY
$ export OPENAI_API_KEY=<key>
$ python3 -m chatdbg -c continue testme.py
ZeroDivisionError: division by zero
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
>~/chatdbg/test/testme.py(4)tryme()
->if x / i > 2:
(ChatDBG Pdb) why
The root cause of the error is that the code tries to divide by zero.
This occurs in the `tryme`functionwhere`range(100)` includes the
value 0, and the code tries to divide by 0 on the line `if x / i >2:`.
The text was updated successfully, but these errors were encountered:
Fixesplasma-umass#2.
Previously, running `why` when `OPENAI_API_KEY` was not set led to an obscure message:
```
(ChatDBG Pdb) why
EXCEPTION 'choices'
```
This happened because `openai_async.chat_complete` does not raise `openai.error.AuthenticationError` when `openai.api_key` is `None`. To handle it, `None` is now replaced with an empty string literal.
Prerequisites
macOS 13.2.1
Steps to reproduce
It starts working after setting
OPENAI_API_KEY
The text was updated successfully, but these errors were encountered: