Python 3.4 cx_freeze [WinError 5] using Selenium - Only on other machines -


i've started devling cx_freeze , creating .exe files other people use.

the script simple: uses selenium scrape javascript-sensitive content on website, , gives user notification when finds matching href + copies link clipboard:

the main code in main.py:

from bs4 import beautifulsoup selenium import webdriver import time import pyperclip  def check():     browser.get(browser.current_url)     page_html = browser.page_source.encode('utf8')     soup = beautifulsoup(page_html, "lxml")     complete_list = soup.find_all('a', href=true)      in complete_list:         if link_to_find in a['href']:             pyperclip.copy(a['href'])             while true:                 beep()  browser = webdriver.chrome(executable_path=path_to_chromedriver) browser.get(url_to_check)  while true:      check()     time.sleep(5) 

the cx_freeze code in setup.py:

import sys cx_freeze import setup, executable  build_exe_options = {"packages": ["os", "lxml", "gzip"], "excludes": ["tkinter"]}  base = 'console'  setup(  name = "web_scraper",     version = "0.1",     description = "desc",     options = {"build_exe": build_exe_options},     executables = [executable("main.py", base=base)]) 

until yesterday, script running fine on both mine , other machines. starting yesterday, error has started pop whenever else runs newly built .exe:s. (new ones still works fine me, old versions still work on other machines):

traceback (most recent call last):     file "c:\python34\lib\site-packages\selenium\webdriver\chrome\service.py", line 68, in start     file "c:\python34\lib\subprocess.py", line 859, in __init__     file "c:\python34\lib\subprocess.py", line 1112, in _execute_child permissionerror: [winerror 5] access denied  during handling of above exception, exception occured:  traceback (most recent call last):     file "c:\python34\lib\site-packages\cx_freeze\initscripts\console.py", line 27, in (module)     file "main.py", line 48, in (module)     file "c:\python34\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 62, in __init__     file "c:\python34\lib\site-packages\selenium\webdriver\chrome\service.py", line 80, in start selenium.common.exceptions.webdriverexception: message: 'exe.win32-3.4' executable may have wrong permissions. please see https://sites.google.com/a/chromium.org/chromedriver/home 

some things i've tried:

  • compiling old versions check if there wrong code.
  • launch console admin when doing python setup.py build
  • disable antivirus
  • made sure chromedriver.exe in right place (if not, error raised).

alright, after 4 hours of troubleshooting realized path_to_chromedriver missing \chromedriver.exe @ end version sending over, correct verison using locally. shoot me.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -