Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep getting error - please refer the logs #4

Open
Python3-Pyro opened this issue Apr 21, 2023 · 6 comments
Open

Keep getting error - please refer the logs #4

Python3-Pyro opened this issue Apr 21, 2023 · 6 comments

Comments

@Python3-Pyro
Copy link

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

@StevenVDP89
Copy link

Noticing the same issue here

@louis-li
Copy link
Owner

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?

@StevenVDP89
Copy link

image

In the .env.sample file, the OPENAI_API_BASE variable is provided. Could the issue relate to the ['openai_base'] value parameter?

@louis-li
Copy link
Owner

You need to change the filename from .env.sample to .env

@sarthak876
Copy link

i have a correct .env file. still its not working

@sganesan18
Copy link

The reported issue was resolved for me by renaming the file from ".env.sample" to ".env" within the application folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants