kyleskom / NBA-Machine-Learning-Sports-Betting

NBA sports betting using machine learning
1.12k stars 422 forks source link

Error Running Script Today #423

Closed HyakuzaO closed 3 months ago

HyakuzaO commented 3 months ago

image

Hello guys, today this error happened for the first time.

Anyone knows how to fix it?

Ty for all that could help me.

Regards Guys 🫡

omerkymcu commented 3 months ago

yes I got the same error too

Scandianis commented 3 months ago

https://github.com/kyleskom/NBA-Machine-Learning-Sports-Betting/issues/416

HyakuzaO commented 3 months ago

@Scandianis Ty bro. What file did you edit? Many thanks

Scandianis commented 3 months ago

Kelly_Criterion.py in src\Utils.

Kelly_Criterion.txt

(rename .txt to .py)

HyakuzaO commented 3 months ago

@Scandianis You are the best dude. Many thanks my friend

thadhutch commented 3 months ago

Seems like the bigger problem is that the odds provider doesn't seem to be working anymore. As you can see in your screenshot all the totals values are 'None'

tfasoli2020 commented 3 months ago

How to fix on jupyter notebooks?

Nikken85 commented 3 months ago

Seems like the bigger problem is that the odds provider doesn't seem to be working anymore. As you can see in your screenshot all the totals values are 'None'

I confirm that I'm also experiencing this issue starting from today: all the values are set to 'None'. Has anyone managed to understand why? How can it be resolved?

image

Scandianis commented 3 months ago

It seems to be missing data from FanDuel:

... No fanduel odds data found for game: {'date': '2024-03-30T02:00:00+00:00', 'status': '22:00 ET', 'home_team': 'Sacramento Kings', 'home_team_loc': 'Sacramento', 'home_team_abbr': 'SAC', 'home_team_rank': -1, 'away_team': 'Dallas Mavericks', 'away_team_loc': 'Dallas', 'away_team_abbr': 'DAL', 'away_team_rank': -1, 'home_score': 0, 'away_score': 0, 'home_spread': {}, 'home_spread_odds': {}, 'away_spread': {}, 'away_spread_odds': {}, 'under_odds': {}, 'over_odds': {}, 'total': {}, 'home_ml': {}, 'away_ml': {}} ...

Could perhaps just be an easter update glitch?

thadhutch commented 3 months ago

Its an issue with the sbrscrape package. I tried a few different providers and none of them seem to work. No one should use these predictions while these values are None. If you take a look at the feature importance of the models you will notice that the 'OU' value is at the top of the list

thadhutch commented 3 months ago

So the issue isn't actually with the package it's with the website itself. If you go to https://www.sportsbookreview.com/betting-odds/nba-basketball/

You'll see that all the odds for today are null

Nikken85 commented 3 months ago

So the issue isn't actually with the package it's with the website itself. If you go to https://www.sportsbookreview.com/betting-odds/nba-basketball/

You'll see that all the odds for today are null

Ah, okay, that's the reason!! Alright then, so all we have to do is wait for them to fix the issue on sportsbookreview.com! Thank you for the analysis

coder4L1 commented 3 months ago

So the issue isn't actually with the package it's with the website itself. If you go to https://www.sportsbookreview.com/betting-odds/nba-basketball/

You'll see that all the odds for today are null

Where is this website stored in the script? Looks like https://www.sportsline.com/nba/odds/ may be an alternative

HyakuzaO commented 3 months ago

So this is a problem by fanduel odds?

willisj318 commented 3 months ago

So the issue isn't actually with the package it's with the website itself. If you go to https://www.sportsbookreview.com/betting-odds/nba-basketball/ You'll see that all the odds for today are null

Where is this website stored in the script? Looks like https://www.sportsline.com/nba/odds/ may be an alternative

It's technically not, it is using sbrscrape which uses sbrodds/sportsbookreview

HyakuzaO commented 3 months ago

So, no fix? Simply a bug from odds today @Scandianis ?

willisj318 commented 3 months ago

Yea either wait or alter the code to use a different provider.

HyakuzaO commented 3 months ago

Let's wait until tomorrow, however, if someone finds a solution, please share it here. Thank you all.

bwwessl commented 3 months ago

Why cant we run the script manually though?

XZoro-404 commented 3 months ago

So the issue isn't actually with the package it's with the website itself. If you go to https://www.sportsbookreview.com/betting-odds/nba-basketball/ You'll see that all the odds for today are null

Where is this website stored in the script? Looks like https://www.sportsline.com/nba/odds/ may be an alternative

The problem would be formatting it all the same.

HyakuzaO commented 3 months ago

Like we said. Maybe tomorrow will work

bwwessl commented 3 months ago

Yeah, hopefully the odds get populated on the src data tomorrow. But what I was asking, was why when I manually input the odds into the script, (simply not passing an odds argument), does the script bomb out? It works fine for over under inputs but not money line odds.

Scandianis commented 3 months ago

Just placed bets according to this table - odds from Unibet and Betsson (BO).

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">

Team | Odds | Prob. | Bankroll factor | EV -- | -- | -- | -- | -- Hornets BO | 7.3 | 0.274089 | 0.1401 | 100.0848 Blazers | 8 | 0.203326 | 0.0717 | 62.66105 Timberwolves | 3.25 | 0.438459 | 0.1372 | 42.49905 76ers | 3.85 | 0.362069 | 0.0903 | 39.39667 Thunder | 2.02 | 0.64039 | 0.2243 | 29.35874 Jazz BO | 3.6 | 0.367178 | 0.0986 | 32.18404 Spurs | 4.1 | 0.2799 | 0.0403 | 14.75885 Pistons | 2.4 | 0.465916 | 0.0612 | 11.81987 Nets | 2.35 | 0.486431 | 0.0625 | 14.31131

Bankroll factor set for concurrent bets. Probability from XGBoost prediction.

coder4L1 commented 3 months ago

Odds seem to be populated and working today. Somewhat unrelated to this issue, but has anyone trained the model for other US sports? MLB, NFL, etc?