Skip to content
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

Issue in Running Default Code #15

Open
Sfigaman opened this issue Feb 18, 2025 · 1 comment
Open

Issue in Running Default Code #15

Sfigaman opened this issue Feb 18, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Sfigaman
Copy link

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?

@Regista6 Regista6 self-assigned this Feb 18, 2025
@Regista6 Regista6 added the bug Something isn't working label Feb 18, 2025
@Regista6
Copy link
Owner

Regista6 commented Feb 18, 2025

Hi,
Thanks for taking interest!

There is probably something wrong with the new version of ortools (9.12.4544) that got released yesterday. I too faced the same error. I will try to investigate this.

In the meantime, try uninstalling the latest version pip uninstall ortools and reinstall a prior version pip install ortools==9.11.4210. That should do the trick.

Btw this is a hard sbc, so to get a solution quickly, try enabling the filter in main.py (L41).

Edit: This is definitely a issue with ortools.

google/or-tools#4552

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants