Open Python3-Pyro opened 1 year ago
Noticing the same issue here
It seems to be missing OPENAI_API_BASE in environmental variables. Can you make sure you have .env created and OPENAI_API_BASE filled in?
In the .env.sample file, the OPENAI_API_BASE variable is provided. Could the issue relate to the ['openai_base'] value parameter?
You need to change the filename from .env.sample to .env
i have a correct .env file. still its not working
The reported issue was resolved for me by renaming the file from ".env.sample" to ".env" within the application folder.
Traceback (most recent call last): application_1 | File "/usr/local/lib/python3.10/site-packages/gunicorn/workers/sync.py", line 136, in handle application_1 | self.handle_request(listener, req, client, addr) application_1 | File "/usr/local/lib/python3.10/site-packages/gunicorn/workers/sync.py", line 179, in handle_request application_1 | respiter = self.wsgi(environ, resp.start_response) application_1 | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2551, in call application_1 | return self.wsgi_app(environ, start_response) application_1 | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2531, in wsgi_app application_1 | response = self.handle_exception(e) application_1 | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2528, in wsgi_app application_1 | response = self.full_dispatch_request() application_1 | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1825, in full_dispatch_request application_1 | rv = self.handle_user_exception(e) application_1 | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1823, in full_dispatch_request application_1 | rv = self.dispatch_request() application_1 | File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1799, in dispatch_request application_1 | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) application_1 | File "/app/app.py", line 77, in api_answer application_1 | os.environ['OPENAI_API_BASE']= get_value(data['openai_base'], "OPENAI_API_BASE") application_1 | File "/usr/local/lib/python3.10/os.py", line 685, in setitem application_1 | value = self.encodevalue(value) application_1 | File "/usr/local/lib/python3.10/os.py", line 757, in encode application_1 | raise TypeError("str expected, not %s" % type(value).name) application_1 | TypeError: str expected, not NoneType