Budget App Project - Error Status 1

Hi there,

I’m working on the third project on FCC (Budget App), finished the first part and wanted to tested in replit but it ends with Error Status 1.

I haven’t done the spent chart etc yet but was hoping to test the start of the code. Any idea?
This is what I’m getting:

My code so far:

class Category:
    def __init__ (self, category_name, ledger):
        self.category_name = category_name
        self.ledger = []
        self.budget = 0
        
    # creating methods:
    def deposit (self, amount: float, description=""):
        self.ledger.append({"amount": amount, "description": description})
        self.budget += amount  
            
    def withdraw (self, amount: float, description=""):
        if self.check_funds >= ["amount"]:
            self.budget -= amount
            self.ledger.append({"amount": -amount, "description": description})
            return True
        else:
            return False   
        
        #for each category
    def get_balance (self):
        return self.budget
        
    def transfer (self, amount, from_category, to_category):
        if self.check_funds >= ["amount"]:
            from_category.withdraw(amount, "Transfer from" + self.from_category)
            self.budget -= amount
            to_category.deposit(amount, "Transfer to" + self.to_category)
            self.budget += amount
            return True
        else:
            return False
        
        #same as get_balance s
        #will be used in withdraw and transfer
    def check_funds (self, amount):
        if self.budget() >= amount:
            return True
        else:
            return False

You could add a placeholder of the function at the end of budget.py, just to allow for importing it, without error.

def create_spend_chart(categories):
    pass
1 Like

I think you deleted the create_spend_chart function, it was there at the beginning

1 Like

Thank you both, yes, i deleted it didnt realise it will cause the error.