AttributeError step 13 Veneer project

[https://www.codecademy.com/paths/computer-science/tracks/cspath-cumulative-art-marketplace/modules/cspath-veneer/projects/veneer ]

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):
self.listing.append(new_listing)

def remove_listings(self, expired_listing):
self.listing.remove(expired_listing)

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

veneer = Marketplace()
print(veneer.show_listings())

And this is the error message I received:
Traceback (most recent call last):
File “script.py”, line 26, in
print(veneer.show_listings())
File “script.py”, 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