-
Notifications
You must be signed in to change notification settings - Fork 49
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
No active exception to reraise #91
Comments
How many teams, divisions, and conferences do you have? It looks like that code is actually generating divisions of size 3 not size 4.
All divisions should be the same size. And every conference should be the same size too. That exception just means that no valid solution was found after 100 attempts for that week (you could try increasing the number of attempts). I should change the code to actually describe the exception more clearly. Not ruling out there isn't a bug but please let me know those values. And then what your |
my comment was also bad next to that i//4. Updated in my last commits to reflect what it actually is doing |
Yes I have 12 teams in the league with 4 divisions made up of 3 teams each. There are 2 conferences with 6 teams in each each. So two divisions within each conference. I increased the attempts to 1000 and it's still failing. This is my
|
I think I found where the issue is coming from. It doesn't look like
|
Ok I got conferences to work now by just setting
And I got my Exception: No valid matchups found for week 0 after 1000000 attempts. Please check your settings are valid or try increasing the number of attempts |
Ah sorry, the code does not work with an odd number of teams in a division or conference. There was a bug in the conferences code you found as well. The schedule generator does not support an odd number of teams in a division since each week is a "themed" week. Divisional week requires every team to play a team from their division and after the first matchup is set the third team in the division has no one left to play. You could probably edit the code to make it work for your use case though. Or do 2 divisions of size 6. See the new notebook https://github.com/rogerfitz/tutorials/blob/master/fantasy_football_schedule_generator/jman_issue.ipynb (it might take a few runs to get this schedule to generate validly but it should work most of the times) |
Maybe in a follow up video I'll add support for odd numbered teams (it is a more complicated approach but would be way more flexible), for now I added a warning in the notebooks, README, and Youtube video |
When running this block I receive an error
Error message
RuntimeError Traceback (most recent call last)
/var/folders/h0/ffqb5f990rqfgzshykzbr2gm0000gn/T/ipykernel_88125/299313015.py in
21 continue
22 if not matchups:
---> 23 raise
24 else:
25 for name, universe in universes.items():
RuntimeError: No active exception to reraise
The text was updated successfully, but these errors were encountered: