google-deepmind / pysc2

StarCraft II Learning Environment
Apache License 2.0
7.96k stars 1.15k forks source link

Colors.py Error fix #356

Open RazorSDU opened 9 months ago

RazorSDU commented 9 months ago

The error: TypeError: Random.shuffle() takes 2 positional arguments but 3 were given

In the code of Colors.py: image

was fixed by replacing it with: def shuffled_hue(scale): palette = list(smooth_hue_palette(scale)) randomkeys = [random.random() for in palette] palette = [x for _, x in sorted(zip(random_keys, palette))] return numpy.array(palette)

alfi10 commented 7 months ago

It also happened to me. I was using python 3.12. I solved it using python 3.10