-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IndexError: list index out of range #182
Comments
Just ran the given example, got the same error |
It is working for me. My version is different from the last available here with only 3 fixes:
|
Do the 3 modifications over the latest commit here and everything will be working. Cannot help you more than that. |
So, in order to get it to work on my system, is there a new release that I need to install or do I need to make all the updates mentioned above myself on my end? It would be great if a guide for the above fix is provided. |
You can wait for a new release but it may take forever. The updates are far behind the new changed done in finviz.com, so it is better to use the latest github updates plus the fast fixes provided here in the comments.
we can see the sources are in the folder
Edit the files screener.py on line 416 and main_func.py on line 110 with the provided fixes. My fix 3 is already done in the latest sources, so if you updated to the latest github commit you don't need to edit |
Thank you. I implemented all 3 fixes above, on my local system, and no issues: everything worked as expected. |
Thank you for all of the great replies and suggestions! |
It might be from a pretty old version of your finviz installation. It is better to remove it first (pip uninstall finviz) and then to install the latest version from github (pip install -U git+https://github.com/mariostoev/finviz). Then to add first two fixes (3rd one is already implemented). If it still doesn't work you should double check if you fixed properly the latest version. Manual download of the latest version in another folder and folder comparing tool with your installed version can confirm you have the latest version and the difference should be only inside the two fixed functions. |
My get_news function in main_func.py throws the following error when I try to run through my StockList:
row.xpath("./td")[1].cssselect('div[class="news-link-right"] span')[0].xpath("text()")[0][1:] IndexError: list index out of range
I understand that it has something to do with the XPath-code for locating the "news-link-right"-element, but I have been unable to figure out what I need to change in order to make it work.
Anyone able to help here?
The text was updated successfully, but these errors were encountered: