PolyMarsDev / Flappuccino

A Pygame game made in 48 hours
355 stars 123 forks source link

colorsys is not defined #11

Open Ancoder2009 opened 3 years ago

Ancoder2009 commented 3 years ago

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_torgb(tint,1,1) NameError: name 'colorsys' is not defined ..

vlcoo commented 3 years ago

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

ghost commented 3 years ago

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 commented 3 years ago

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

byemc commented 3 years ago

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 commented 3 years ago

Yeah, that really proves it. Just reinstall Python.

Btw, I use WSL all the time.


From: ByeMC @.> Sent: Monday, April 19, 2021 11:27 AM To: PolyMarsDev/Flappuccino @.> Cc: fel1x0u @.>; Comment @.> Subject: Re: [PolyMarsDev/Flappuccino] colorsys is not defined (#11)

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]https://user-images.githubusercontent.com/77801870/115284901-27f33e00-a145-11eb-9a95-bff5d6ccc31e.png

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/PolyMarsDev/Flappuccino/issues/11#issuecomment-822681394, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARR6QUMNRNYJAUXZ2EZVK63TJRY2DANCNFSM4ZFXDBWA.

syskill-the-coder commented 2 years ago

Its not needed, you can just delete it lol

byemc commented 2 years ago

Its not needed, you can just delete it lol

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

meetshah1205 commented 8 months ago

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

meetshah1205 commented 8 months ago

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

No its not