Open Featuredutka opened 2 years ago
Some checks later I discovered that the problem is not completely gone. It appears there are some stocks with no provided information at all (like PFE or MRK on the screenshot) - not even an empty string. So the try/exception wrap won't work for those.
Console data output for each stock in list:
To fix that another try/except clause was added
Console output after fix:
Fix for the issue
511
After a couple of experiments I found out that the error was caused by python trying to convert an empty string to the float.
Sample terminal output for 'PG' stock:
So, apparantely that blank line was causing all the problems, but not any more with the try/except wrap.