AttributeError step 13 Veneer project

[ ]

In step 13 of the Veneer project I try to print the listings with print(veneer.show_listings())
I did everything exactly as stated in the walkthrough video, but I get an AttributeError.

This is the class and the print statement:

class Marketplace:
def int(self):
self.listings =

def add_listing(self, new_listing):

def remove_listings(self, expired_listing):

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

veneer = Marketplace()

And this is the error message I received:
Traceback (most recent call last):
File “”, line 26, in
File “”, line 22, in show_listings
for listing in self.listings:
AttributeError: ‘Marketplace’ object has no attribute ‘listings’

Can someone please tell me whats wrong about it? Thanks :slight_smile:

Hi @lisaschnitzmeier,

You have no __init__ method, so self.listings does not get defined when you instantiate Marketplace. Instead, you have this __int__ method:

  def __int__(self):
    self.listings = []

Evidently, there is a spelling error.

@appylpye: Thank you very much for spotting the error :slight_smile:

1 Like