title: pyinstaller one file --no-console does not work "Fatal Error"
body: <p>I try 2 options with pyinstaller one with console and one without.</p>
  
  <p>I am using Windows 10, Python 3.5.4, Windows Chrome Driver 2.33 and Selnium 3.6.0 and Pyinstaller 3.3.</p>
  
  <p>The one <strong><em>without</em></strong> console fails:</p>
  
  <p>Here is the code for <strong><em>Test.py</em></strong></p>
  
  <pre><code>#!python3
  from selenium import webdriver
  
  # Chrome Proxy options and disable the Yellow Bar about Chrome being controlled by Automated Software.
  chrome_options = webdriver.ChromeOptions()
  chrome_options.add_argument("--disable-infobars")
  chrome_options.add_argument("--disable-logging")
  chrome_options.add_argument("--disable-notifications")
  chrome_options.add_argument("--disable-default-apps")
  chrome_options.add_argument("--disable-extensions")
  
  
  # load google.com with the proxy settings and a logging path to a file
  driver = webdriver.Chrome(r"D:\Selenium\chromedriver_win32\chromedriver.exe", chrome_options=chrome_options)
  
  # maximise window
  driver.maximize_window()
  
  driver.get("https://www.google.com/mail")
  </code></pre>
  
  <p>Here are the pyinstaller commands with the exact same code:</p>
  
  <p><em>- With console window aka works:</em></p>
  
  <pre><code>pyinstaller -F -i favicon.ico Test.py
  </code></pre>
  
  <p><em>- Without the console Window fails</em></p>
  
  <pre><code>pyinstaller -F --noconsole -i favicon.ico Test.py
  </code></pre>
  
  <p>I get this error:</p>
  
  <pre><code>*"Failed to execute script error"*
  </code></pre>
  
  <p>I am not sure why.</p>
  
  <p>Thanks</p>
  
  <hr>
  
  <p>Thanks for your reply I looked in:</p>
  
  <pre><code>C:\Users\testuser\AppData\Local\Programs\Python\Python35\Lib\site-packages\selenium\webdriver\chrome\service.py
  </code></pre>
  
  <p>There was nothing for subprocess here.</p>
  
  <p>I also checked:</p>
  
  <pre><code>C:\Users\testuer\AppData\Local\Programs\Python\Python35\Lib\site-packages\selenium\webdriver\common\service.py
  </code></pre>
  
  <p>On line 70 I added in the entry for stdin=self.log_file as it was missing</p>
  
  <pre><code> try:
              cmd = [self.path]
              cmd.extend(self.command_line_args())
              self.process = subprocess.Popen(cmd, env=self.env,
                                              close_fds=platform.system() != 'Windows',
                                              stdin=self.log_file, stdout=self.log_file, stderr=self.log_file)
  </code></pre>
  
  <p>Recreated with pyinstaller:</p>
  
  <pre><code>pyinstaller -F --noconsole  -i favicon.ico Test.py
  </code></pre>
  
  <p>This created the exe however now the console window appeared....</p>
  
  <p><a href="https://stackoverflow.com/questions/33867183/python-program-with-seleniumwebdriver-dont-work-as-single-and-noconsole-exe-f">Python program with selenium(webdriver) Don&#39;t Work as single and noconsole exe file (pyinstaller)</a></p>