Missing 1 required positional argument 'element'

Type error: __init__() missing 1 required positional argument: 'element'

I got the code from github. I wanted to run but it doesn't work. Can you help

    from equation import Equation
    
    from time import sleep
    
    def run_balance():
    
        """
    
        Runs the chemical equation balance algorithm
    
        """
    
        print('=================================================')
    
        print('Insert chemical equation with elements in\nparentheses followed by the number of atoms:')
    
        print('Example: (H)2 + (O)2 = (H)2(O)1')
    
        user_input = input('>>> ')
    
        try:
    
            equation = Equation(user_input)
    
            print('Balanced equation: ' + equation.balance())
    
            sleep(3)
    
            run_balance()
    
        except IndexError:
    
            print('Invalid input...')
    
            sleep(3)
    
            run_balance()
    
    run_balance()


Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation