Help with veneer project: AttributeError: type object 'Art' has no attribute 'title'

In the exercise for the Marketplace “Veneer”

I’m getting the following error:

AttributeError: type object ‘Art’ has no attribute ‘title’

but I think Art has this attribute on its constructor as follow:

class Art():
  def __init__(self, artist, title, medium, year, owner ):
    self.artist = artist
    self.title = title
    self.medium = medium
    self.year = year
    self.owner = owner

  def __repr__(self):
    return self.artist + ', "'  + self.title + '". ' + str(self.year) +", " + self.medium + ". " + + ", " + self.owner.location +"."

class Marketplace:
  def __init__(self):
    self.listings = []
  def add_listing(self, new_listing):

  def show_listings(self):
    for item in self.listings:

veneer = Marketplace()


class Client():
  def __init__(self, name, location, is_museum, ): = name 
    self.is_museum = is_museum
    if is_museum:
      self.location = location
      self.location = "Private location"
  def sell_artwork(self, artwork, price):
    if artwork.owner == self:
      new_listing = Listing(artwork, price, self)

    def buy_artwork(self, artwork):
      if artwork.owner != self:
        art_listing = None
        for listing in veneer.listings:
          if == artwork:
            art_listing  = listing
        if art_listing != None:
 = self

edytta = Client("Edytta Halpirt", "Private Collection", False)

moma = Client("The MOMA", "New York", True)

girl_with_mandolin = Art("Picasso, Pablo","Girl with a Mandolin (Fanny Tellier)", "oil on canvas", 1910, edytta)

class Listing():
  def __init__(self, art, price, seller): = Art
    self.price = price
    self.seller = seller

  def __repr__(self):
    return '%s,%s.'%(, self.price)

edytta.sell_artwork(girl_with_mandolin, "$6M (USD")



Why is that?

Hello, @piwero, and welcome to the Codecademy Forums!

Carefully check the indentation of all of your methods, for example, the buy_artwork method for Client.

Also check this __init__ method that you have for Listing:

  def __init__(self, art, price, seller): = Art
    self.price = price
    self.seller = seller

What are you assigning to


The problem is in the line = Art

It should be art without the capitalized ‘A’, to reference the argument you pass into the parameter ‘art’.

1 Like