EA-FC-24-Automated-SBC-Solving icon indicating copy to clipboard operation
EA-FC-24-Automated-SBC-Solving copied to clipboard

Issue in Running Default Code

Open Sfigaman opened this issue 8 months ago • 2 comments

Hi, i just downloaded the .zip of the code, installed all the dependencies and tried running the code.

I get this error: C:\Users\micha\Desktop\EA-FC-Automated-SBC-Solving-master>py main.py load C:\Users\micha\AppData\Roaming\Python\Python313\site-packages\ortools.libs\zlib1.dll... load C:\Users\micha\AppData\Roaming\Python\Python313\site-packages\ortools.libs\abseil_dll.dll... load C:\Users\micha\AppData\Roaming\Python\Python313\site-packages\ortools.libs\utf8_validity.dll... load C:\Users\micha\AppData\Roaming\Python\Python313\site-packages\ortools.libs\re2.dll... load C:\Users\micha\AppData\Roaming\Python\Python313\site-packages\ortools.libs\libprotobuf.dll... load C:\Users\micha\AppData\Roaming\Python\Python313\site-packages\ortools.libs\highs.dll... load C:\Users\micha\AppData\Roaming\Python\Python313\site-packages\ortools.libs\ortools.dll... Processing time create_var: 0.11 seconds Processing time create_basic_constraints: 0.01 seconds Processing time create_max_club_constraint: 0.01 seconds Processing time create_unique_league_constraint: 0.01 seconds Processing time create_unique_country_constraint: 0.01 seconds Processing time create_rarity_2_constraint: 0.0 seconds Processing time create_squad_rating_constraint_3: 0.06 seconds Traceback (most recent call last): File "C:\Users\micha\Desktop\EA-FC-Automated-SBC-Solving-master\main.py", line 64, in final_players = optimize.SBC(df) File "C:\Users\micha\Desktop\EA-FC-Automated-SBC-Solving-master\optimize.py", line 10, in wrapper result = func(*args, **kwargs) File "C:\Users\micha\Desktop\EA-FC-Automated-SBC-Solving-master\optimize.py", line 620, in SBC model, pos, chem_expr = create_chemistry_constraint(df, model, chem, z_club, z_league, z_nation, player, players_grouped, num_cnts, map_idx, b_c, b_l, b_n) ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\micha\Desktop\EA-FC-Automated-SBC-Solving-master\optimize.py", line 10, in wrapper result = func(*args, **kwargs) File "C:\Users\micha\Desktop\EA-FC-Automated-SBC-Solving-master\optimize.py", line 256, in create_chemistry_constraint m_pos[player[i]] = pos[i] ~~~~~^^^^^^^^^^^ TypeError: unhashable type: 'IntVar'

How can i solve it?

Sfigaman avatar Feb 18 '25 09:02 Sfigaman