bendominguez0111 / nba-models

NBA Three-Point Model for Sports Betting
https://www.fantasydatapros.com
15 stars 1 forks source link

TypeError: string indices must be integers #4

Open molhck opened 1 year ago

molhck commented 1 year ago

Hi,

Sorry for the inconvenience again, after setting up my api, I went to run the main.py and now I get this error. I'm not sure why I'm getting this type of error.

Capture d’écran, le 2023-03-02 à 18 49 37

Thanks again

bendominguez0111 commented 1 year ago

Might be something with your api key? I've never gotten that error before. Can you try debugging and and printing the data object to the console?

molhck commented 1 year ago

Honestly, it might be to advanced for me. I try debugging it and it show me the same errors. And I don't know where to start. Maybe I place my api at the wrong, I'll try to continue to search for my error

ltwotimes commented 1 year ago

I actually run into the same exact problem. I ran the model yesterday with no issues but wondering if that's because you (Ben) already ran it. Wondering if it's because I have the free version of Odds API or what. Thank you!

model error
bendominguez0111 commented 1 year ago

It's most not likely working cause you're not setting an environment variable for the ODDS_API_KEY variable. You can get a free api key from here: https://the-odds-api.com/#get-access

bendominguez0111 commented 1 year ago

Based on what I've heard from others, that's likely the issue

ltwotimes commented 1 year ago

Thank you for the reply. I will keep at it to see where I am messing up. I was able to use their sample APIs and saw it was using my usage. But when I c/p that code into the config, I see those errors above.

Side Note: I have been enjoying the Fantasy Football/Basketball courses you and Frank have provided. Thanks!