LostRuins / koboldcpp

A simple one-file way to run various GGML and GGUF models with KoboldAI's UI
https://github.com/lostruins/koboldcpp
GNU Affero General Public License v3.0
4.36k stars 312 forks source link

windows environment asyncio\windows_events.py error #836

Open linkingnie opened 1 month ago

linkingnie commented 1 month ago

Traceback (most recent call last): File "asyncio\windows_events.py", line 434, in select RuntimeError: <_overlapped.Overlapped object at 0x0000022333E7A540> still has pending operation at deallocation, the process may crash

linkingnie commented 1 month ago

Add the following code to avoid errors: if platform.system() == 'Windows': asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())

linkingnie commented 1 month ago

This error occurs when using SSE requests.

LostRuins commented 1 month ago

Is this error only present on exit? I have not observed any issues with SSE

linkingnie commented 1 month ago

This error occurs after each generate. https://github.com/LostRuins/koboldcpp/assets/51227152/5f33ffdd-f5ac-414c-9ec5-6d2595d044b0

LostRuins commented 1 month ago

Hmm alright, i'll take a look, a bit hesitant to change it because I don't know what that fully does.

Can you try changing the Streaming mode in settings from SSE to Poll? Would that solve your issue?

linkingnie commented 1 month ago

OK, thanks. This error does not seem to affect the generation. I have modified the code to remove the error message. But I still want to report it to you.