abhishek-mygit / Cricket-Match-Win-Predictor

A program (Python) or an GUI application (Tkinter) that predicts the percentage of victory of any team in a cricket match by scraping on its own, the statistics of the players from the web.
4 stars 5 forks source link

I have an error in the project kindly help #3

Closed codemonkfromait closed 4 years ago

codemonkfromait commented 4 years ago

There is some error in project and i am attaching a screenshot of the same kindly tell me what to do

apart from that there is a path in project what is that does i need to create that path kindly help..................... Screenshot from 2020-04-25 21-38-18 Screenshot from 2020-04-25 21-39-23

abhishek-mygit commented 4 years ago

Hi @codemonkfromait , This is a project that was developed around 2 years back. And it works on scraping data from web. Please do first ensure if the websites (like ESPN CricInfo STATSGURU) still maintain the same URL format to display the results to the users. If so, this code should absolutely work fine. Or else, you must reconstruct the URL as per new standards.

The issue in your screenshot says string to float conversion error. Then there might be any alpha characters in the TeamScore variable. Comment the value of TeamScore if possible. First, try printing the TeamScore value and check what value it contains and please ensure if it has only numeric characters. If not, then website should either have changed the URL format or should have changed the division IDs or divison class names from which the code retrieves the content. Due to which, the code might scrap the undesired content. In this case, you might need to inspect the present webpage and feed in the current correct tag identifiers.

It is better to print and check if all the critical variables retrieve only the desired data. This will help you ensure if the web pages are still maintained in the same way. Else, you can proceed to make the necessary changes.

Coming to last part of question, no need to do any changes to path variable. It was just written to achieve relative path but later not used. Just ensure if you have all the necessary files in the same directory. Feel free to fork this repository for better results.