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

colorsys is not defined #11

Open
Ancoder2009 opened this issue Mar 15, 2021 · 9 comments
Open

colorsys is not defined #11

Ancoder2009 opened this issue Mar 15, 2021 · 9 comments

Comments

@Ancoder2009
Copy link

Traceback (most recent call last):
File "C:\Users\Anthony admintrator\Desktop\Flappuccino-main\Flappuccino-main\main.py", line 277, in
main()
File "C:\Users\Anthony admintrator\Desktop\Flappuccino-main\Flappuccino-main\main.py", line 161, in main
o.setSprite(((player.position.y/50) % 100) / 100)
File "C:\Users\Anthony admintrator\Desktop\Flappuccino-main\Flappuccino-main\background.py", line 9, in setSprite
color = colorsys.hsv_to_rgb(tint,1,1)
NameError: name 'colorsys' is not defined
._.

@vlcoo
Copy link

vlcoo commented Mar 15, 2021

Go to background.py and edit the first line so it reads:
import pygame, colorsys
That worked for me.

@ghost
Copy link

ghost commented Apr 14, 2021

Go to background.py and edit the first line so it reads:
import pygame, colorsys
That worked for me.

Yep this game is broken after my pull, I missed this but otherwise there are no errors whatsoever :/

@fel1x0u
Copy link

fel1x0u commented Apr 15, 2021

Or, you don’t have Colorsys installed (or I am just thinking that it’s a pip package)

@byemc
Copy link

byemc commented Apr 19, 2021

Or, you don’t have Colorsys installed (or I am just thinking that it’s a pip package)

I think it's built into python, like random, argparse or json.

This is my clean Ubuntu WSL installation. As you can see, colorsys imported, but not sadsadas as it doesn't exist.

image

@fel1x0u
Copy link

fel1x0u commented Apr 20, 2021 via email

JanPoonthong added a commit to JanPoonthong/Flappuccino that referenced this issue Apr 22, 2021
Fix:
    Traceback (most recent call last):
      File "main.py", line 277, in <module>
	main()
      File "main.py", line 161, in main
	o.setSprite(((player.position.y/50) % 100) / 100)
      File "/home/jan/Tmp/Flappuccino/background.py", line 9, in setSprite
	color = colorsys.hsv_to_rgb(tint,1,1)
    NameError: name 'colorsys' is not defined
@syskill-the-coder
Copy link

Its not needed, you can just delete it lol

@byemc
Copy link

byemc commented Aug 11, 2022

Its not needed, you can just delete it lol

Sorry, what isn't? The game won't really work without it iirc

@meetshah1205
Copy link

Same thing happened to me, I solved it by going to background.py and just putting:
import colorsys
On the top.

@meetshah1205
Copy link

Or, you don’t have Colorsys installed (or I am just thinking that it’s a pip package)

No its not

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

6 participants