function copy_rates_from_pos return empty data when running in python file but return correct data when using jupyter notebook

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi all,
currently, I am creating the python script to pulling m5 data (login with XM broker). Yesterday, the code ran well but it failed today. I have tried to run the code in jupyter notebook but it still worked well (receiving the data), however it returns empty when using termial to trigger the .py file.
this is my code (already imported all the packages):
does anyone know what is the possible root cause and what I can do? runing the script using python 3.9.11 on windows 10