InternLM / InternLM/HuixiangDou

请问如何解决 There is no current event loop in thread %r.'

Open
#356 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
2.5k
Forks
179
PR merge metrics
No merged PRs in 30d

Description

## error log | 日志或报错信息 | ログ
Exception in thread Thread-4 (run):
Traceback (most recent call last):
File "/home/pgpu/anaconda3/envs/Huixiangdou/lib/python3.10/threading.py", line 1009, in _bootstrap_inner
self.run()
File "/home/pgpu/anaconda3/envs/Huixiangdou/lib/python3.10/threading.py", line 946, in run
self._target(*self._args, **self._kwargs)
File "/home/pgpu/anaconda3/envs/Huixiangdou/lib/python3.10/site-packages/uvicorn/server.py", line 62, in run
return asyncio.run(self.serve(sockets=sockets))
File "/home/pgpu/anaconda3/envs/Huixiangdou/lib/python3.10/site-packages/nest_asyncio.py", line 26, in run
loop = asyncio.get_event_loop()
File "/home/pgpu/anaconda3/envs/Huixiangdou/lib/python3.10/site-packages/nest_asyncio.py", line 40, in _get_event_loop
loop = events.get_event_loop_policy().get_event_loop()
File "/home/pgpu/anaconda3/envs/Huixiangdou/lib/python3.10/asyncio/events.py", line 656, in get_event_loop
raise RuntimeError('There is no current event loop in thread %r.'

## context | 编译/运行环境 | バックグラウンド
按照requirement 安装,运行本地大模型
## how to reproduce | 复现步骤 | 再現方法

1.python3 -m huixiangdou.gradio --standalone

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running `python3 -m huixiangdou.gradio --standalone` and trace the `huixiangdou.gradio` entry point through the thread and asyncio startup shown in the traceback. Confirm the local-model interface starts without the “There is no current event loop” error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.