Python多重处理-Frozen_support()错误

嗨,我正在尝试使用Selenium运行多个google chrome窗口,我需要能够使用函数来启动子进程。

这是我的代码:

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as expect
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import time
import sys
from multiprocessing import Process, Value

PATH = "C:\chromedriver\chromedriver.exe"

def session(state):
    options = webdriver.ChromeOptions()
    options.add_experimental_option('excludeSwitches', ['enable-logging'])

    driver = webdriver.Chrome(PATH, options=options)
    url = "https://www.google.com"
    driver.get(url)

    while True:
        pass


sessions = []
def runSessions():
    state = Value('i', 1)

    for i in range(2):
        p = Process(target=session, args=(state,))
        sessions.append(p)

    for p in sessions:
        p.start()

runSessions()

But i'm unable to even run this as whenever I call the function runSessions(), it throws me this error:

RuntimeError:
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.

        This probably means that you are not using fork to start your
        child processes and you have forgotten to use the proper idiom
        in the main module:

            if __name__ == '__main__':
                freeze_support()
                ...

        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce an executable.