mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
Yahoo Finance Analysis Plugin not working #101
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rishabh-dream11 on GitHub (Mar 20, 2025).
Self Checks
Dify version
1.1.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
See the
image for reference.
✔️ Expected Behavior
Should work Flawlessly for any compatible model
❌ Actual Behavior
Request
{"yahoo_finance_analytics": {"symbol": "AMZN", "start_date": "2023-01-01", "end_date": "2024-03-17"}}
Response
{"yahoo_finance_analytics": "tool invoke error: PluginInvokeError: {"args":{},"error_type":"KeyError","message":"'Adj Close'"}"}
@dosubot[bot] commented on GitHub (Mar 20, 2025):
Hey @rishabh-dream11! 👋 I'm here to help you with bug fixes, answer your questions, and assist you while you wait for a human maintainer. Let's squash those bugs together!
The issue you're encountering with the Yahoo Finance Analysis Plugin seems to be related to a
KeyErrorfor the 'Adj Close' field. This error typically occurs when the expected 'Adj Close' field is missing from the data returned by the Yahoo Finance API.Here are a few steps you can take to troubleshoot and potentially resolve this issue:
Verify Data Availability: Ensure that the 'Adj Close' data is available for the stock symbol and date range you are querying. Sometimes, the data might not be available for certain stocks or date ranges.
Check Data Fetching Logic: Review the code that fetches data from Yahoo Finance to ensure it correctly handles cases where 'Adj Close' might be missing. You might need to add error handling to manage such cases gracefully.
Update Dependencies: Ensure that all dependencies, especially the
yfinancelibrary, are up to date. There might be updates or bug fixes that address this issue.Debugging: Add logging or print statements to check the structure of the data being returned before accessing the 'Adj Close' field. This can help identify if the data is being fetched correctly.
If these steps do not resolve the issue, you might need to delve deeper into the plugin's code to handle cases where 'Adj Close' is not present in the data.
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other