pyinstallerでexe化したファイルが起動できないエラー
FX取引サイトへの自動ログインおよび自動売買を製作しています。
対象のファイルをpyinstallerでexe化したところ、アプリケーションを実行すると
「Failed to execute script test」
というエラーになり起動できません。
検索して調べてみましたが、どのように対処したらよいかわからず躓いております。
動作環境
python 3.7
Windows10 64bit
vscode
pyinstallerの実行ソースは
pyinstaller test.py --noconsole --onefile -p "C:\Users\USER\Desktop\chromedriver_win32\chromedriver.exe"
で実行しました。
exe化したいファイルのソースは
python
1test.py 2from time import sleep 3from selenium import webdriver 4from selenium.webdriver.common.keys import Keys 5from selenium.webdriver.chrome.options import Options 6import configparser 7 8inifile = configparser.ConfigParser() 9inifile.read("config.ini","UTF-8") 10 11options = Options() 12options.binary_location = ('C:\Program Files (x86)\Google\Chrome\Application\chrome.exe') 13 14user_id = inifile.get("settings","ID") #ログインID 15password = inifile.get("settings","PASS") #ログインパスワード 16 17driver = webdriver.Chrome(chrome_options = options,executable_path = "C:\Users\USER\Desktop\chromedriver_win32\chromedriver.exe") 18driver.fullscreen_window() 19driver.implicitly_wait(8) 20 21print("----------START----------") 22driver.get("https://jp.highlow.net/login") 23#driver.find_element_by_id("login-username").send_keys(user_id) 24#driver.find_element_by_id("login-password").send_keys(password) 25#driver.find_element_by_class_name("btn").click() 26 27driver.find_element_by_class_name("asset-filter--opener").click() 28element1 = driver.find_element_by_id("searchBox") 29element1.send_keys("symbol") 30sleep(3) 31 32driver.find_element_by_class_name("asset_item").click() 33driver.find_element_by_id("ChangingStrike").click() 34driver.find_element_by_id("2125").click() 35driver.find_element_by_class_name("trading-platform-instrument-one-click-toggler").click() 36 37element2 = driver.find_element_by_id("amount") 38element2.send_keys(Keys.CONTROL,"a") 39element2.send_keys(Keys.BACKSPACE) 40element2.send_keys("123456") 41 42driver.find_element_by_id("up_button").click() 43driver.find_element_by_id("down_button").click() 44print("-----------END-----------")
になります。
どなたかお分かりになる方に知恵を貸して頂けると幸いです。
宜しくお願いします。

回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。