Python Forum
'module' object is not callable
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
'module' object is not callable
#1
white = pygame.color(255,255,255) 
TypeError: 'module' object is not callable

When I run the code that happens.
Reply
#2
  • Please, give your posts meaningful names that give idea of the problem you are stuck with. This may help
  • Please, use formatting for the code
  • Obviously
    pygame.color
    is a name of a module, not function or class - thus an exception
Test everything in a Python shell (iPython, Azure Notebook, etc.)
  • Someone gave you an advice you liked? Test it - maybe the advice was actually bad.
  • Someone gave you an advice you think is bad? Test it before arguing - maybe it was good.
  • You posted a claim that something you did not test works? Be prepared to eat your hat.
Reply
#3
(Apr-19-2017, 06:05 PM)lilCasio Wrote: white = pygame.color(255,255,255) 
TypeError: 'module' object is not callable

When I run the code that happens.

Not to be rude but please post in the PyGame section for PyGame help.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [PyGame] Int object not callable error! ghost0fkarma 2 7,180 Nov-14-2018, 03:02 AM
Last Post: ghost0fkarma

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020