title: Python Attribute Error: type object has no attribute
body: <p>I am new to Python and programming in general and try to teach myself some Object-Oriented Python and got this error on my lattest project: </p>
  
  <pre><code>AttributeError: type object 'Goblin' has no attribute 'color'
  </code></pre>
  
  <p>I have a file to create "Monster" classes and a "Goblin" subclass that extends from the Monster class.
  When I import both classes the console returns no error</p>
  
  <pre><code>&gt;&gt;&gt;from monster import Goblin
  &gt;&gt;&gt;
  </code></pre>
  
  <p>Even creating an instance works without problems:</p>
  
  <pre><code>&gt;&gt;&gt;Azog = Goblin
  &gt;&gt;&gt;
  </code></pre>
  
  <p>But when I call an attribute of my Goblin class then the console returns the error on top and I don't figure out why. 
  Here is the complete code:</p>
  
  <pre><code>import random
  
  COLORS = ['yellow','red','blue','green']
  
  
  class Monster:
      min_hit_points = 1
      max_hit_points = 1
      min_experience = 1
      max_experience = 1
      weapon = 'sword'
      sound = 'roar'
  
      def __init__(self, **kwargs):
          self.hit_points = random.randint(self.min_hitpoints, self.max_hit_points)
          self.experience = random.randint(self.min_experience,  self.max_experience)
          self.color = random.choice(COLORS)
  
          for key,value in kwargs.items():
              setattr(self, key, value)
  
      def battlecry(self):
          return self.sound.upper()
  
  
  class Goblin(Monster):
      max_hit_points = 3
      max_experience = 2
      sound = 'squiek'
  </code></pre>