Hello all maybe you give me a few ideas how to fix… I decide I try out openai and playing around but have bug right off the bat and tried to fix with no luck.
Using PyCharm Community 2023.2.5
verified openai version 1.6.1 in lib
I got other coding before the client stuff to work in earlier projects did
listen-speech to text, output print & speech
6 import openai
8 api_key = 'sk-1rodpuXlpg6E9si7' # remove char from my code before post
9 client = openai.Client(api_key)
error repeated this my ways of coding it, even tried chatGPT to help and it runs me thru loop as see all correct
Note it looks like coming from main.py as only common error code both debug and run
Traceback (most recent call last):
DEBUG - LISTED LINES OF ERRORS
LINE 1
File “C:\Program Files\JetBrains\PyCharm Community Edition 2023.2.5\plugins\python-ce\helpers\pydev\pydevd.py”, line 1500, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
LINE 2
File “C:\Program Files\JetBrains\PyCharm Community Edition 2023.2.5\plugins\python-ce\helpers\pydev_pydev_imps_pydev_execfile.py”, line 18, in execfile
exec(compile(contents+“\n”, file, ‘exec’), glob, loc)
DEBUG- LISTED
RUN ONLY LIST THIS ERROR SAME CODE AS ABOVE
LINE 3
File “C:\Users\vrpro.LATTEPANDASIGMA\PycharmProjects\pythonProject11\main.py”, line 9, in
client = openai.Client(api_key)
TypeError: init() takes 1 positional argument but 2 were given
Process finished with exit code 1
Thank you in advance all for comments