gpt4free icon indicating copy to clipboard operation
gpt4free copied to clipboard

Curlm alread closed! quitting from process_data

Open Zapzatron opened this issue 10 months ago • 1 comments

Bug description

from g4f.client import AsyncClient
import asyncio
import sys


if sys.platform.startswith('win'):
    asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())


async def main():
    client = AsyncClient()
    response = await client.chat.completions.create(
        model="gpt-3.5-turbo",
        messages=[{"role": "user", "content": "Say this is a test"}],
    )

    print(response.choices[0].message.content)


asyncio.run(main())

When I run the code, I get a warning. Output:

F:\...\.venv\lib\site-packages\curl_cffi\aio.py:205: UserWarning: Curlm alread closed! quitting from process_data
  warnings.warn("Curlm alread closed! quitting from process_data")
This is a test.

Environment

  • python version: 3.10.11
  • package version: g4f[all]==0.2.9.11

Zapzatron avatar Apr 17 '24 17:04 Zapzatron

Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again.

github-actions[bot] avatar Apr 25 '24 00:04 github-actions[bot]

Closing due to inactivity.

github-actions[bot] avatar May 03 '24 00:05 github-actions[bot]

I am also experiencing this. @Zapzatron Did you ever find a solution?

momobadarni avatar Jun 07 '24 22:06 momobadarni

I am also experiencing this. @Zapzatron Did you ever find a solution? did you solve this problem?

wkz2003 avatar Jun 29 '24 15:06 wkz2003

I just don't use gpt4free :)

Zapzatron avatar Jun 29 '24 20:06 Zapzatron

The problem remains, how can it be fixed?

devnos avatar Jul 13 '24 00:07 devnos