You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run the python code "triple_moving_average.py" , I was getting the above error.
After working and analysing the issue, I got that the path given ,for loading the data in the rd.load_data(), was wrong because
the length of the sys.argv is equal to 1 and thus we cannot access sys.argv[1] ,thus giving index error.
In the "triple_moving_average.py" , when I commented the whole code after if __name__ == "__main__": (as you can see in the above figure), the code runs fine. Below is the output
So I think the whole code after if __name__ == "__main__": can be commented to avoid any IndexError.
The text was updated successfully, but these errors were encountered:
When I run the python code "triple_moving_average.py" , I was getting the above error.
After working and analysing the issue, I got that the path given ,for loading the data in the
rd.load_data()
, was wrong becausethe length of the
sys.argv
is equal to 1 and thus we cannot accesssys.argv[1]
,thus giving index error.In the "triple_moving_average.py" , when I commented the whole code after
if __name__ == "__main__":
(as you can see in the above figure), the code runs fine. Below is the outputSo I think the whole code after
if __name__ == "__main__":
can be commented to avoid any IndexError.The text was updated successfully, but these errors were encountered: