SilverStar1003 / Stock-Portfolio-Web-application

The Stock Portfolio Management App is a powerful tool designed to help users effectively manage their stock investments. With features such as user authentication, stock data retrieval, portfolio tracking, performance comparison against benchmarks, and transaction recording, this app provides a comprehensive solution for investors.
2 stars 0 forks source link

No data available for the specified stock ticker and date. #1

Open johnfelipe opened 7 months ago

johnfelipe commented 7 months ago

No data available for the specified stock ticker and date.

IndexError: single positional indexer is out-of-bounds Traceback: File "/root/Stock-Portfolio-Web-application/env/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 534, in _run_script exec(code, module.dict) File "/root/Stock-Portfolio-Web-application/portfolio.py", line 288, in current_price = stock_data['Close'].iloc[0] File "/root/Stock-Portfolio-Web-application/env/lib/python3.10/site-packages/pandas/core/indexing.py", line 1153, in getitem return self._getitem_axis(maybe_callable, axis=axis) File "/root/Stock-Portfolio-Web-application/env/lib/python3.10/site-packages/pandas/core/indexing.py", line 1714, in _getitem_axis self._validate_integer(key, axis) File "/root/Stock-Portfolio-Web-application/env/lib/python3.10/site-packages/pandas/core/indexing.py", line 1647, in _validate_integer raise IndexError("single positional indexer is out-of-bounds")

how solve that?

SilverStar1003 commented 7 months ago
  1. Make sure you have downloaded the DB schema and connected to it properly
  2. Go to the directory in the command prompt and use the command "streamlit run file-name.py"
  3. Use the correct credentials to log in to the web app
  4. The yfinance API is used to download the ticker data, could you ensure you have installed yfinance (use pip install yfinance in the command prompt)? The stock data is also limited to the American markets.