Python SDK: AttributeError: 'function' object has no attribute 'get'

I am facing AttributeError: ‘function’ object has no attribute ‘get’ when trying to run a test using python sdk.
Here is my code:
from selenium.webdriver.common.by import By
from selenium.webdriver.support.select import Select
from src.testproject.classes import DriverStepSettings, StepSettings
from src.testproject.decorator import report_assertion_errors
from src.testproject.enums import SleepTimingType
from src.testproject.enums import TakeScreenshotConditionType
from src.testproject.sdk.drivers import webdriver
import pytest

@pytest.fixture()
def driver():
driver = webdriver.Chrome(token=“my token”,project_name=“openSDK test”,
job_name=“test1”)
step_settings = StepSettings(timeout=15000,
sleep_time=500,
sleep_timing_type=SleepTimingType.Before)
with DriverStepSettings(driver, step_settings):
yield driver
driver.quit()

@report_assertion_errors
def test_main(driver):
driver.get(“https://www.google.com”)

if name ==“main”:
test_main(driver)

Can someone please help?

Hi @ekjot.singh,
You didn’t code the test correctly.
Here is a fixed snippet:

from selenium.webdriver.common.by import By
from selenium.webdriver.support.select import Select
from src.testproject.classes import DriverStepSettings, StepSettings
from src.testproject.decorator import report_assertion_errors
from src.testproject.enums import SleepTimingType
from src.testproject.enums import TakeScreenshotConditionType
from src.testproject.sdk.drivers import webdriver
import pytest


@pytest.fixture()
def driver():
    driver = webdriver.Chrome(token='8PuUSW53OkGoreVRr_DQEM65OAbH_7Yi7ra51fErnDo1', project_name='openSDK test',
                              job_name='test1')

    step_settings = StepSettings(timeout=15000, sleep_time=500, sleep_timing_type=SleepTimingType.Before)

    with DriverStepSettings(driver, step_settings):
        yield driver

    driver.quit()


# @report_assertion_errors
def test_main(driver):
    if __name__ == 'main':
        driver.get('https://www.google.com')
        driver.quit()