InternLM / InternLM/MindSearch

TypeError: 'NoneType' object is not subscriptable

Open
#261 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
6.9k
Forks
692
PR merge metrics
No merged PRs in 30d

Description

This problem always occurs, and when it does, the front-end does not respond, and sometimes it is normal and sometimes it reports an error
How should I solve it !!!!

error messages:
2024-11-19 11:16:03,616 - app.py[line:72] - ERROR: Exception in sync_generator_wrapper: 'NoneType' object is not subscriptable
Traceback (most recent call last):
File "/home/model/ms/mindsearch/app.py", line 69, in sync_generator_wrapper
for response in agent.stream_chat(inputs):
File "/home/model/ms/mindsearch/agent/mindsearch_agent.py", line 237, in stream_chat
yield from self._process_code(agent_return, inner_history,
File "/home/model/ms/mindsearch/agent/mindsearch_agent.py", line 284, in _process_code
reference, references_url = self._generate_reference(
File "/home/model/ms/mindsearch/agent/mindsearch_agent.py", line 315, in _generate_reference
ref_results = agent_return.nodes[node_name]['detail'].actions[
TypeError: 'NoneType' object is not subscriptable

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with app.py around sync_generator_wrapper and agent/mindsearch_agent.py at stream_chat, _process_code, and _generate_reference line 315. Trace how agent_return.nodes[node_name]['detail'] is produced and reproduce the failing stream_chat path. Done means the reported NoneType exception no longer leaves the front end unresponsive, with regression coverage for the failing case.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.