I wrote a script on my laptop and tried it at home on my pc. It works on the laptop but when running on the pc, the script runs but doesn't return anything. It also doesn't show an error.
It is a very simple script to download the stock data of apple:
import pandas as pd
import yfinance as yf
print('start')
ticker = "AAPL"
df = yf.download(ticker, period="max")
print('middle')
df.to_csv(f"./Data/{ticker}.csv")
print('end')
Can you tell me what the reason is that nothing is being downloaded?
I run it on my laptop with a venv (Python 3.11.1) and on my pc with a venv (Python 3.11.2) yfinance version 0.2.27
I added the print commands to see where it breaks. The first gets executed. the rest not.
edit: I work with VSCode. I tried to run it in an interactive window to figure out if I get any data from the download and the whole script ran without a problem! I now tried it again with "run python file" and it still doesn't work.
The issue is solved. The anti-virus software interrupted the process. The problem no longer exists after whitelisting the folder. thank you for your help.