"type" object is not subscriptable python selenium : im a newbie to python selenium environment. this is my piece of code.

from selenium import webdriver

from selenium.webdriver.support.ui import WebDriverWait

import unittest

class LoginTest(unittest.TestCase):

    def setUp(self):

        self.driver= webdriver.Firefox()
        self.driver.get("https://www.facebook.com/")

    def test_Login(self):
        driver=self.driver
        facebookUsername ="somoe@gmail.com"
        facebookPassword ="basabasa"
        emailFieldID     = "email"
        passFieldID      = "pass"
        loginButtonXpath = "//input[@value= 'Log In']"
        fbLogoXpath      = "(//a[contains(href , 'logo')])[1]"
        
        emailFieldElement    = WebDriverWait[driver, 10].until(lambda driver:driver.find_element_by_id(emailFieldID))
        passwordFieldElement = WebDriverWait[driver, 10].until(lambda driver:driver.find_element_by_id(passFieldID))
        loginButtonElement   = WebDriverWait[driver, 10].until(lambda driver:driver.find_element_by_xpath(loginButtonXpath))

        emailFieldElement.clear()
        emailFieldElement.send_keys(facebookUsername)
        passFieldElement.clear()
        passFieldElement.send_keys(facebookPassword)
        loginButtonElement.click()
        loginButtonElement=WebDriverWait[driver, 10].until(lambda driver : driver.find_element_by_xpath(fbLogoXpath))

    def tearDown(self):
        self.driver.quit()


if __name__=='__main__':
        unittest.main()
 this code loads facebook when it runs but does not autofill the email and password area and returns with the error mentioned above. i need urgent help in this if possible. thank you.