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

Colors.py Error fix #356

Open
RazorSDU opened this issue Oct 3, 2023 · 1 comment
Open

Colors.py Error fix #356

RazorSDU opened this issue Oct 3, 2023 · 1 comment

Comments

@RazorSDU
Copy link

RazorSDU commented Oct 3, 2023

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))
random_keys = [random.random() for _ in palette]
palette = [x for _, x in sorted(zip(random_keys, palette))]
return numpy.array(palette)

@alfi10
Copy link

alfi10 commented Nov 20, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants