5

खोलने यहाँ खोलने क्रोम के लिए मेरे कोड है:अजगर सेलेनियम webdriver "सत्र नहीं बनाया" अपवाद जब क्रोम

Traceback (most recent call last): 
    File "C:/Users/Imran/PycharmProjects/webscrapping/WF Item.py", line 6, in <module> 
    driver = webdriver.Chrome('C:\\Users\\Imran\\AppData\\Local\\Programs\\Python\\Python36\\selenium\\chromedriver.exe') 
    File "C:\Users\Imran\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 69, in __init__ 
    desired_capabilities=desired_capabilities) 
    File "C:\Users\Imran\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 92, in __init__ 
    self.start_session(desired_capabilities, browser_profile) 
    File "C:\Users\Imran\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 179, in start_session 
    response = self.execute(Command.NEW_SESSION, capabilities) 
    File "C:\Users\Imran\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 236, in execute 
    self.error_handler.check_response(response) 
    File "C:\Users\Imran\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 192, in check_response 
    raise exception_class(message, screen, stacktrace) 
selenium.common.exceptions.WebDriverException: Message: session not created exception 
from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"27028.1","isDefault":true},"id":1,"name":"","origin":"://"} 
    (Session info: chrome=54.0.2840.71) 
    (Driver info: chromedriver=2.23.409699 (49b0fa931cda1caad0ae15b7d1b68004acd05129),platform=Windows NT 6.3.9600 x86_64) 

निम्न अपवाद हो रही है: जब कार्यक्रम चल रहा

from selenium import webdriver 
driver=webdriver.Chrome('C:\\Users\\Imran\\AppData\\Local\\Programs\\Python\\Python36\\selenium\\chromedriver.exe') 

त्रुटि

selenium.common.exceptions.WebDriverException: Message: session not created exception 
+0

क्या आपको कोई समाधान मिला? –

उत्तर

12

आपको क्रोमरेड्रिवर 2.24 बनाम अपडेट करें n यहां से: http://chromedriver.storage.googleapis.com/index.html?path=2.24/

कि के लिए मुझे

+0

मैं वास्तव में समझ नहीं पा रहा हूं कि हम क्रोमेड्रिवर को कैसे अपडेट करते हैं? मेरे पास [~/anaconda/bin] => में [क्रोमेड्रिवर] है [> क्या मुझे [क्रोमेड्रिवर] फ़ाइल को नई अनजिपेड [क्रोमेड्रिवर] फ़ाइल के साथ डाउनलोड, अनजिप और प्रतिस्थापित करना चाहिए? –

+0

धन्यवाद soooooooooooooo बहुत प्यारे भाई –

+0

मैं अपने लिनक्स sysyem पर स्थापित/अद्यतन करने के लिए उपयुक्त तरीका का उपयोग कर रहा हूँ –

0

पर खिड़कियां, डाउनलोड chromedriver स्थापित करने के लिए और chromedriver_win32.zip अनज़िप और सेटिंग वातावरण चर में chromedriver.exe वाले फ़ोल्डर के लिए पथ को जोड़ने [सिस्टम गुण - उन्नत सिस्टम सेटिंग्स - पर्यावरण चर]।

संबंधित मुद्दे