🔍 API报错解决方案大全

程序员必备 · 错误查询手册 · AI智能解答

🏠 返回首页

1,308

已收录的API报错解决方案

错误信息: Error Details: { "message": "Cannot read properties of undefined (reading 'message')" } 堆栈信息: AI_ProviderSpecificError: Error Details: { "message": "Cannot read properties of undefined (reading 'message')" } at AiSdkToChunkAdapter.convertAndEmitChunk (file:///C:/Users/Administrator/AppData/Local/Programs/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-DyCRTTD5.js:250294:63) at AiSdkToChunkAdapter.readFullStream (file:///C:/Users/Administrator/AppData/Local/Programs/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-DyCRTTD5.js:250137:10) at async AiSdkToChunkAdapter.processStream (file:///C:/Users/Administrator/AppData/Local/Programs/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-DyCRTTD5.js:250107:31) at async ModernAiProvider.modernCompletions (file:///C:/Users/Administrator/AppData/Local/Programs/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-DyCRTTD5.js:259358:22) at async ModernAiProvider._completionsOrImageGeneration (file:///C:/Users/Administrator/AppData/Local/Programs/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-DyCRTTD5.js:259279:10) at async ModernAiProvider.completions (file:///C:/Users/Administrator/AppData/Local/Programs/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-DyCRTTD5.js:259262:17) at async fetchChatCompletion (file:///C:/Users/Administrator/AppData/Local/Programs/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-DyCRTTD5.js:259480:2) at async transformMessagesAndFetch (file:///C:/Users/Administrator/AppData/Local/Programs/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-DyCRTTD5.js:72008:3) at async fetchAndProcessAssistantResponseImpl (file:///C:/Users/Administrator/AppData/Local/Programs/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-DyCRTTD5.js:73293:3) at async file:///C:/Users/Administrator/AppData/Local/Programs/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-DyCRTTD5.js:73540:5 错误原因: {}

2025年11月19日

("Error code: 400 - {'error': {'message': 'Request contains an invalid argument. (request id: 2025111917312841895688sb0yhHlV) (request id: 2025111917312841362809xQocweJf)', 'type': 'rix_api_error', 'param': '', 'code': 400}}")Traceback (most recent call last): File "/localdata/hyzhou/miniconda3/envs/heychou/lib/python3.13/site-packages/langchain_core/language_models/chat_models.py", line 914, in generate self._generate_with_cache( ~~~~~~~~~~~~~~~~~~~~~~~~~^ m, ^^ ...<2 lines>... **kwargs, ^^^^^^^^^ ) ^ File "/localdata/hyzhou/miniconda3/envs/heychou/lib/python3.13/site-packages/langchain_core/language_models/chat_models.py", line 1208, in _generate_with_cache result = self._generate( messages, stop=stop, run_manager=run_manager, **kwargs ) File "/localdata/hyzhou/miniconda3/envs/heychou/lib/python3.13/site-packages/langchain_openai/chat_models/base.py", line 1213, in _generate raise e File "/localdata/hyzhou/miniconda3/envs/heychou/lib/python3.13/site-packages/langchain_openai/chat_models/base.py", line 1208, in _generate raw_response = self.client.with_raw_response.create(**payload) File "/localdata/hyzhou/miniconda3/envs/heychou/lib/python3.13/site-packages/openai/_legacy_response.py", line 364, in wrapped return cast(LegacyAPIResponse[R], func(*args, **kwargs)) ~~~~^^^^^^^^^^^^^^^^^ File "/localdata/hyzhou/miniconda3/envs/heychou/lib/python3.13/site-packages/openai/_utils/_utils.py", line 286, in wrapper return func(*args, **kwargs) File "/localdata/hyzhou/miniconda3/envs/heychou/lib/python3.13/site-packages/openai/resources/chat/completions/completions.py", line 1147, in create return self._post( ~~~~~~~~~~^ "/chat/completions", ^^^^^^^^^^^^^^^^^^^^ ...<46 lines>... stream_cls=Stream[ChatCompletionChunk], ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/localdata/hyzhou/miniconda3/envs/heychou/lib/python3.13/site-packages/openai/_base_client.py", line 1259, in post return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)) ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/localdata/hyzhou/miniconda3/envs/heychou/lib/python3.13/site-packages/openai/_base_client.py", line 1047, in request raise self._make_status_error_from_response(err.response) from None openai.BadRequestError: Error code: 400 - {'error': {'message': 'Request contains an invalid argument. (request id: 2025111917312841895688sb0yhHlV) (request id: 2025111917312841362809xQocweJf)', 'type': 'rix_api_error', 'param': '', 'code': 400}}

2025年11月19日

("Error code: 400 - {'error': {'message': 'Request contains an invalid argument. (request id: 2025111917312841895688sb0yhHlV) (request id: 2025111917312841362809xQocweJf)', 'type': 'rix_api_error', 'param': '', 'code': 400}}")Traceback (most recent call last): File "/localdata/hyzhou/miniconda3/envs/heychou/lib/python3.13/site-packages/langchain_core/language_models/chat_models.py", line 914, in generate self._generate_with_cache( ~~~~~~~~~~~~~~~~~~~~~~~~~^ m, ^^ ...<2 lines>... **kwargs, ^^^^^^^^^ ) ^ File "/localdata/hyzhou/miniconda3/envs/heychou/lib/python3.13/site-packages/langchain_core/language_models/chat_models.py", line 1208, in _generate_with_cache result = self._generate( messages, stop=stop, run_manager=run_manager, **kwargs ) File "/localdata/hyzhou/miniconda3/envs/heychou/lib/python3.13/site-packages/langchain_openai/chat_models/base.py", line 1213, in _generate raise e File "/localdata/hyzhou/miniconda3/envs/heychou/lib/python3.13/site-packages/langchain_openai/chat_models/base.py", line 1208, in _generate raw_response = self.client.with_raw_response.create(**payload) File "/localdata/hyzhou/miniconda3/envs/heychou/lib/python3.13/site-packages/openai/_legacy_response.py", line 364, in wrapped return cast(LegacyAPIResponse[R], func(*args, **kwargs)) ~~~~^^^^^^^^^^^^^^^^^ File "/localdata/hyzhou/miniconda3/envs/heychou/lib/python3.13/site-packages/openai/_utils/_utils.py", line 286, in wrapper return func(*args, **kwargs) File "/localdata/hyzhou/miniconda3/envs/heychou/lib/python3.13/site-packages/openai/resources/chat/completions/completions.py", line 1147, in create return self._post( ~~~~~~~~~~^ "/chat/completions", ^^^^^^^^^^^^^^^^^^^^ ...<46 lines>... stream_cls=Stream[ChatCompletionChunk], ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/localdata/hyzhou/miniconda3/envs/heychou/lib/python3.13/site-packages/openai/_base_client.py", line 1259, in post return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)) ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/localdata/hyzhou/miniconda3/envs/heychou/lib/python3.13/site-packages/openai/_base_client.py", line 1047, in request raise self._make_status_error_from_response(err.response) from None openai.BadRequestError: Error code: 400 - {'error': {'message': 'Request contains an invalid argument. (request id: 2025111917312841895688sb0yhHlV) (request id: 2025111917312841362809xQocweJf)', 'type': 'rix_api_error', 'param': '', 'code': 400}}

2025年11月19日

Invalid JSON payload received. Unknown name "type" at tools[0].function declarations[15].***,properties[5].***,***,properties[2].***.***.p roperties[1].***,items': Proto field is not repeating, cannot start list. invalid JSON payload received. Unknown name "type" at tools[0].function declarations[15].***.properties[211.***,***.properties[2].***,*** items': Proto field is not repeating, cannot start list. Invalid JSON payload received.Unknown name "type" at tools[0l.function declarations[16].***.properties[5].******,properties[2].***.***.p roperties[1].***,items': Proto field is not repeating, cannot start list. Invalid JSON payload received. Unknown name "type" at tools[0].function declarations[16].***.properties[211.***,***.properties[2].***.*** items': Proto field is not repeating, cannot start list 请求错误,请检查请求参数是否正确。如果修改了模型设置,请重置到默认设置

2025年11月19日

'str' object has no attribute 'choices' File "C:\Users\soiry\python-pro\公司\company.py", line 451, in chat_with_deepseek return response.choices[0].message.content ^^^^^^^^^^^^^^^^ File "C:\Users\soiry\python-pro\公司\company.py", line 480, in wordshuchu response = chat_with_deepseek(user_input,model_set1, system_prompt, conversation_history) File "C:\Users\soiry\python-pro\公司\company.py", line 524, in <module> jichu = wordshuchu(muban1+muban2+user_input,model_set) AttributeError: 'str' object has no attribute 'choices'

2025年11月19日

Error code: 404 - {'error': {'message': 'Invalid URL (POST /v1/chat/completions/chat/completio发生异常: AttributeError 'str' object has no attribute 'choices' File "C:\Users\soiry\python-pro\公司\company.py", line 451, in chat_with_deepseek return response.choices[0].message.content ^^^^^^^^^^^^^^^^ File "C:\Users\soiry\python-pro\公司\company.py", line 480, in wordshuchu response = chat_with_deepseek(user_input,model_set1, system_prompt, conversation_history) File "C:\Users\soiry\python-pro\公司\company.py", line 524, in <module> jichu = wordshuchu(muban1+muban2+user_input,model_set) AttributeError: 'str' object has no attribute 'choices'ns)', 'type': 'invalid_request_error', 'code': ''}}

2025年11月19日