yahoo tools is not avaliable
Self Checks
- [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
- [x] I have searched for existing issues search for existing issues, including closed ones.
- [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
- [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
- [x] Please do not modify this template :) and fill in all the required fields.
Dify version
0.15.2
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
- create an agent
- add yahoo tools
- any models is ok
- ask agent like "please give me 600195.SH tickets info" or "please give me 600195 tickets info"
- then the agent will use yahoo tools and result is
request
{"yahoo_finance_ticker": "{\"symbol\": \"600519\"}"}
response
{"yahoo_finance_ticker": "tool invoke error: Expecting value: line 1 column 1 (char 0)"}
✔️ Expected Behavior
No response
❌ Actual Behavior
No response
Hello, @Sherlocksuper! I'm here to help you with bug reports, answer questions, and guide you on how to contribute. Let's tackle this issue together while we wait for a human maintainer to join in.
The error message "tool invoke error: Expecting value: line 1 column 1 (char 0)" typically indicates that the response from the Yahoo Finance API is empty or not in the expected JSON format. This can happen due to several reasons:
-
Invalid Ticker Symbol: Ensure that the ticker symbol "600519" is valid and recognized by Yahoo Finance. If the symbol is incorrect or not supported, the API might return an empty response.
-
Connection Issues: There might be a problem with the internet connection or the API endpoint, leading to an incomplete or empty response. Check your network connection and ensure that the API endpoint is accessible.
-
API Limitations or Changes: Yahoo Finance might have limitations on the number of requests or changes in their API that could affect the response. Verify if there are any known issues or updates regarding the Yahoo Finance API.
-
Configuration Issues: Double-check the configuration settings for the Yahoo tools in your Dify setup to ensure everything is correctly set up, especially if you are self-hosting.
If the issue persists, you might want to add logging or debugging to capture the exact response from the API to better understand the problem.
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other
ref: https://help.yahoo.com/kb/SLN2310.html
In Yahoo Finance, Shanghai Stock Exchange is coded as SS and Shenzhen Stock Exchange is coded as SZ.
You can check this link 600195.SS.
ref: https://help.yahoo.com/kb/SLN2310.html
In Yahoo Finance, Shanghai Stock Exchange is coded as
SSand Shenzhen Stock Exchange is coded asSZ.You can check this link 600195.SS.
Thanks for you but i tried it again There is still an error
I encountered the same problem. I used 'NVDA' to get stock information by yahoo finance ticker.
{ "error_message": "Failed to invoke tool: Expecting value: line 1 column 1 (char 0)", "error_type": "UnknownError" }
What model are you using? Maybe the model itself does not support function call?
I use local model, DeepSeek-R1-Distill-Qwen-32B. Hmm... But I just test the ticker and this is the error message.
https://github.com/deepseek-ai/DeepSeek-R1/issues/9
deepseek r1 currently does not support function call, you can try to use other models.
Thanks for your imfomation. I will try to use other models.
I use Gemini-2.0-Flash-001 model. But I got the same error. I think yahoo tool doesn't work. Please check it out
Same issue!
There are several issues with similar error messages in yfinance https://github.com/ranaroussi/yfinance/issues/2304 https://github.com/ranaroussi/yfinance/issues/2179
Maybe you have encountered rate-limit, or your IP has been banned by Yahoo.
Dify seems to be preparing a major version update now. After this update, adding more detailed error messages to Yahoo Tools may be helpful for troubleshooting.
The dify team can update yfinance [0.2.54] to solve this issue.
为什么不从 雪球、东方财富、同花顺去调用数据呢?
I have the same issue. Tried to install both versions of yahoo finance plugins.
Hello, i am running new 1.0 release and get this error too
Request {"yahoo_finance_news": {"symbol": "IBM"}} Response {"yahoo_finance_news": "tool invoke error: PluginInvokeError: {\"args\":{},\"error_type\":\"JSONDecodeError\",\"message\":\"Expecting value: line 1 column 1 (char 0)\"}"}
this was tested with GPT 4o 4omini chatgpt-4o-latest, deepseek reasoning, claude 37 and all; returning the same error.
please can this be investigated and resolved the yahoo finance plugin would be amazing if it was functional.
It caused by rate limit on my test. Not the tool itself.
The error message says failed tool invoke.
On Sat, Mar 1, 2025, 4:33 PM Kalo Chin @.***> wrote:
It caused by rate limit on my test. Not the tool itself.
— Reply to this email directly, view it on GitHub https://github.com/langgenius/dify/issues/13403#issuecomment-2692429622, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQTPMJOQNOL7DNPU5AYF7L2SIRRLAVCNFSM6AAAAABWXOV6GCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJSGQZDSNRSGI . You are receiving this because you commented.Message ID: @.***> [image: fdb02983rhy]fdb02983rhy left a comment (langgenius/dify#13403) https://github.com/langgenius/dify/issues/13403#issuecomment-2692429622
It caused by rate limit on my test. Not the tool itself.
— Reply to this email directly, view it on GitHub https://github.com/langgenius/dify/issues/13403#issuecomment-2692429622, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQTPMJOQNOL7DNPU5AYF7L2SIRRLAVCNFSM6AAAAABWXOV6GCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJSGQZDSNRSGI . You are receiving this because you commented.Message ID: @.***>
I just found that it caused by the SDK version. See https://github.com/langgenius/dify-official-plugins/pull/352