Free-GPT4-WEB-API icon indicating copy to clipboard operation
Free-GPT4-WEB-API copied to clipboard

Internal server error

Open JackChen6203 opened this issue 1 year ago • 3 comments

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>

JackChen6203 avatar Apr 28 '24 02:04 JackChen6203

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?

git-malik avatar Apr 29 '24 09:04 git-malik

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

JackChen6203 avatar May 05 '24 08:05 JackChen6203

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

git-malik avatar May 15 '24 20:05 git-malik