I have tried multiple thing to try and fix this error I am unable to load the script.
I have tried simple parameters to try and isolate the issue but to no luck I get the same error followed by a series of other multiple errors and the script ends.
Here is my log:
Cookie file not found, creating cookie...
Error: 2018-01-25 11:22:03 - INFO - Session started - 2018-01-25 11:22:03
2018-01-25 11:22:03 - WARNING - Sorry, Record Activity is not working on Windows. We're working to fix this soon!
Traceback (most recent call last):
File "quickstart.py", line 5, in
session.login()
File "D:\2016 main *\My documents\GitHub\InstaPy\instapy\instapy.py", line 253, in login
self.bypass_suspicious_attempt):
File "D:\2016 main *\My documents\GitHub\InstaPy\instapy\login_util.py", line 115, in login_user
"//footer[@class='_s5vm9']/div[@class='_g7lf5 _9z659']/nav["
File "C:\Users**\AppData\Local\Programs\Python\Python36-32lib\site-packages\seleniumwebdriver\remotewebdriver.py", line 365, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "C:\Users*\AppData\Local\Programs\Python\Python36-32lib\site-packages\seleniumwebdriver\remotewebdriver.py", line 843, in find_element
'value': value})['value']
File "C:\Users*\AppData\Local\Programs\Python\Python36-32lib\site-packages\seleniumwebdriver\remotewebdriver.py", line 308, in execute
self.error_handler.check_response(response)
File "C:\Users**\AppData\Local\Programs\Python\Python36-32lib\site-packages\seleniumwebdriver\remote\errorhandler.py", line 194, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//footer[@class='_s5vm9']/div[@class='_g7lf5 _9z659']/nav[@class='_luodr']/ul[@class='_g8wl6']/li[@class='_538w0'][10]/span[@class='_pqycz _hqmnd']/select[@class='_fsoey']/option[text()='English']"}
(Session info: chrome=63.0.3239.132)
(Driver info: chromedriver=2.35.528161 (5b82f2d2aae0ca24b877009200ced9065a772e73),platform=Windows NT 6.1.7601 SP1 x86_64)
Take a look a this [(https://github.com/timgrossmann/InstaPy/pull/1280)]
i tryed everything u guys posted here, but nothing worked for me. Here is what worked: i changed it to Firefox browser, so it could create the freaking file, then i switched back to headless chrome, and TADAA, its working now.
@fegomess : I have the same issue, could you please tell me more about how did you change to Firefox btowser !?
i have the same problem i don't understand how to fix it can u help me
I deleted the whole script.foldwr and pulled the scripts again through the GitHub software
On 18 Mar 2018 16:55, emyabdel notifications@github.com wrote:
i have the same problem i don't understand how to fix it can u help me
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/timgrossmann/InstaPy/issues/1285#issuecomment-374010214, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AenV5BAAKy6W82cIJW2zgVovYjKSV1Oyks5tfoNsgaJpZM4Rsog3.
Finally found a simple solution for this problem...
in deleted in login_util.py:
_try:
for cookie in pickle.load(
open("{0}{1}_cookie.pkl".format(logfolder, username), "rb")
):
browser.add_cookie(cookie)
cookie_loaded = True
except (WebDriverException, OSError, IOError):
print("Cookie file not found, creating cookie...")
reload_webpage(browser)_
and i replaced it with:
_browser.find_element_by_xpath('/html/body/div[2]/div/div/div/div[2]/button[1]').click()_
Most helpful comment
Finally found a simple solution for this problem...
in deleted in login_util.py:
_try:
for cookie in pickle.load(
open("{0}{1}_cookie.pkl".format(logfolder, username), "rb")
):
browser.add_cookie(cookie)
cookie_loaded = True
except (WebDriverException, OSError, IOError):
print("Cookie file not found, creating cookie...")
reload_webpage(browser)_
and i replaced it with:
_browser.find_element_by_xpath('/html/body/div[2]/div/div/div/div[2]/button[1]').click()_