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

Internal server error #43

Open
JackChen6203 opened this issue Apr 28, 2024 · 3 comments
Open

Internal server error #43

JackChen6203 opened this issue Apr 28, 2024 · 3 comments

Comments

@JackChen6203
Copy link

I'm using docker,and when I send GET request with text params, it shows

<!doctype html>
<html lang=en>
  <title>500 Internal Server Error</title>
  <h1>Internal Server Error</h1>
  <p>The server encountered an internal error and was unable to complete your
    request. Either the server is overloaded or there is an error in the
    application.</p>
@git-malik
Copy link
Collaborator

Could you please provide more details by sending the container's logs?
Also, Did you modify the docker-compose.yml file? What changes did you make?

@JackChen6203
Copy link
Author

log as below:

2024-05-05 16:43:05 [2024-05-05 08:43:05,267] ERROR in app: Exception on / [GET]
2024-05-05 16:43:05 Traceback (most recent call last):
2024-05-05 16:43:05   File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1455, in wsgi_app
2024-05-05 16:43:05     response = self.full_dispatch_request()
2024-05-05 16:43:05                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-05-05 16:43:05   File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 869, in full_dispatch_request
2024-05-05 16:43:05     rv = self.handle_user_exception(e)
2024-05-05 16:43:05          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-05-05 16:43:05   File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 867, in full_dispatch_request
2024-05-05 16:43:05     rv = self.dispatch_request()
2024-05-05 16:43:05          ^^^^^^^^^^^^^^^^^^^^^^^
2024-05-05 16:43:05   File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 852, in dispatch_request
2024-05-05 16:43:05     return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
2024-05-05 16:43:05            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-05-05 16:43:05   File "/usr/local/lib/python3.11/site-packages/asgiref/sync.py", line 277, in __call__
2024-05-05 16:43:05     return call_result.result()
2024-05-05 16:43:05            ^^^^^^^^^^^^^^^^^^^^
2024-05-05 16:43:05   File "/usr/local/lib/python3.11/concurrent/futures/_base.py", line 449, in result
2024-05-05 16:43:05     return self.__get_result()
2024-05-05 16:43:05            ^^^^^^^^^^^^^^^^^^^
2024-05-05 16:43:05   File "/usr/local/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
2024-05-05 16:43:05     raise self._exception
2024-05-05 16:43:05   File "/usr/local/lib/python3.11/site-packages/asgiref/sync.py", line 353, in main_wrap
2024-05-05 16:43:05     result = await self.awaitable(*args, **kwargs)
2024-05-05 16:43:05              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-05-05 16:43:05   File "/app/src/FreeGPT4_Server.py", line 133, in index
2024-05-05 16:43:05     await PROVIDERS[args.provider].create_async(
2024-05-05 16:43:05   File "/usr/local/lib/python3.11/site-packages/g4f/Provider/base_provider.py", line 122, in create_async
2024-05-05 16:43:05     return "".join([
2024-05-05 16:43:05                    ^
2024-05-05 16:43:05   File "/usr/local/lib/python3.11/site-packages/g4f/Provider/base_provider.py", line 122, in <listcomp>
2024-05-05 16:43:05     return "".join([
2024-05-05 16:43:05                    ^
2024-05-05 16:43:05   File "/usr/local/lib/python3.11/site-packages/g4f/Provider/Bing.py", line 432, in stream_generate
2024-05-05 16:43:05     conversation = await create_conversation(session, tone, image, proxy)
2024-05-05 16:43:05                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-05-05 16:43:05   File "/usr/local/lib/python3.11/site-packages/g4f/Provider/Bing.py", line 73, in create_conversation
2024-05-05 16:43:05     data = await response.json()
2024-05-05 16:43:05            ^^^^^^^^^^^^^^^^^^^^^
2024-05-05 16:43:05   File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 1105, in json
2024-05-05 16:43:05     raise ContentTypeError(
2024-05-05 16:43:05 aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8', url=URL('https://www.bing.com/turing/conversation/create?bundleVersion=1.1199.4')
2024-05-05 16:43:05 192.168.65.1 - - [05/May/2024 08:43:05] "GET /?text=321 HTTP/1.1" 500 -

I don't modify docker-compose.yml

@git-malik
Copy link
Collaborator

Is the issue persisting at the moment?
I don't know how to replicate the bug, could you provide your docker-compose.yml configuration?

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

2 participants